Comment by codesnik
activerecord in Rails has async mode, which allows you to queue several requests and read results later. But those will go through the connection pool, and will be executed in separate connections, separate transactions, and separate PostgreSQL server processes. I wonder if using pipelining instead, on a driver level (app code would be the same), would be a better approach in general, or at least easier on db instance.
ah, of course it have been discussed already https://discuss.rubyonrails.org/t/proposal-adding-postgres-p...