On Wednesday, January 2, 2013, John R Pierce wrote: > On 1/2/2013 7:45 PM, Craig Ringer wrote: > >> You really need to put a connection pool in place to limit the number of >> concurrent workers. Look at PgBouncer or PgPool-II. As far as I know >> neither of them runs on Windows; you might want to think about a Linux >> box as a front-end. >> > > 2nd and 3rd the emotion. > > > of course, a pooler only works right if the client applications are > modified to open a connection, do a transaction, and close the connection. > if the clients continue to hold idle connections, the pooler won't do > anything useful for you. >
If you can get away with pooling at the transaction level rather than the session level, then you should still get a benefit even if the connections are persistent. (If each of the 500 connections is as connected as a different PG role, you wouldn't get a benefit from transaction pooling, but in that case you probably wouldn't get a benefit from session pooling, either.) Cheers, Jeff