Apparently the pg
gem uses prepared statements
for Postgres. I have seen fixes for Unicorn to ensure that each process uses it's own db connection like so:
after_fork do |server, worker|
ActiveRecord::Base.establish_connection
end
But I have no idea how to make this work with Resque.