I found this post that explained how you can add a function in a workflow that is a resource query (bulk insert to Postgres for my use case) and call it in a loop over chunks of data.
New function in the workflow:
Updated Javascript code block to slice chunks (and removed the postgres insert code block)
My bulk insert is now completing in less than 10 secs!