>> I don't follow that. Why would using a connection pooler change the multiples
>> of work_mem that a connection would use?
>
> I assume that a connection pooler would keep processes running longer,
> so even if they were not all using work_mem, they would have that memory
> mapped into the process, and perhaps swapped out.
Yes, and then this is when it *really* matters what OS you're running,
and what release. FreeBSD and Solaris++ don't overallocate RAM, so
those long-running connections pin a lot of RAM eventually. And for
Linux, it's a question of how aggressive the OOM killer is, which kinda
depends on distro/version/sysadmin settings.
When I configure pgbouncer for Illumos users, I specifically have it
rotate out old connections once an hour for this reason.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com