Why would I want to use connection pooling middleware?

From: Kirk Strauser <kirk(at)strauser(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Why would I want to use connection pooling middleware?
Date: 2009-01-15 15:54:50
Message-ID: D2D51D23-680C-458D-9EA3-DB2655F538DC@strauser.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a PostgreSQL 8.3.5 server with max_connections = 400. At this
moment, I have 223 open connections, including 64 from a bunch of
webserver processes and about 100 from desktop machines running a
particular application. The rest are from various scheduled processes
and other assorted things. Now, I know there are projects like pgpool-
II that can serve to pool connections to the server. Why would I want
to do that, though?

I understand why pooling within a process itself is a good thing.
However, say I have two users running the same program on different
desktop machines. At present, those applications connect with the
same username/password that's tied to the program and not the actual
user. It seems like if Abby and Barb end up sharing the same
connection from the pool, and Abby runs some giant report query, then
Barb would get held back while she waits for it to finish. Is that
true? Even if not, what would be the advantage in the two of them
sharing a connection?

I'm just trying to wrap my head around this. Thanks!
--
Kirk Strauser

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-01-15 16:08:41 Re: Why would I want to use connection pooling middleware?
Previous Message A. Kretschmer 2009-01-15 14:06:47 Question regarding new windowing functions in 8.4devel