Make it possible to run queries in on_commit hooks on Postgres.