I'm using pgbouncer on a web app and most threads begin with a BEGIN and end with a COMMIT or a ROLLBACK, so we're using transaction pooling and everything is fine.
However, we also have some processes which don't use transactions: instead, they just issue commands one after another.
I believe that, under transaction pooling, every command is a transaction by itself, just the way it is when you're connected directly to the server, and perhaps every command is getting a different connection from the pool. But I've been told that pgbouncer wouldn't do that and instead would never find the final COMMIT/ROLLBACK and thus the connection wouldn't return to the pool.
Anybody knows what happens? I couldn't find anything in the documentation.