Skip site navigation (1) Skip section navigation (2)

Re: Admission Control Policy

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Dimitri Fontaine" <dfontaine(at)hi-media(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Admission Control Policy
Date: 2009-12-28 21:59:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Dimitri Fontaine <dfontaine(at)hi-media(dot)com> wrote:
> Le 28 déc. 2009 à 21:33, Kevin Grittner a écrit :
>> We often see posts from people who have more active connections
>> than is efficient.
> How would your proposal better solve the problem than using
> pgbouncer?
With my current knowledge of pgbouncer I can't answer that
definitively; but *if* pgbouncer, when configured for transaction
pooling, can queue new transaction requests until a connection is
free, then the differences would be:
(1)  According to pgbouncer documentation, transaction pooling is "a
hack as it breaks application expectations of backend connection.
You can use it only when application cooperates with such usage by
not using features that can break."  This would not be an issue with
an ACP.
(2)  For the "active connection" aspect of the policy, you could let
through superuser requests while other requests were queuing.
(3)  With the ACP, the statements would be parsed and optimized
before queuing, so they would be "ready to execute" as soon as a
connection was freed.
(4)  Other factors than active connection count could be applied,
like expected memory consumption, or more esoteric metrics.
In favor of pgbouncer (or other connection poolers) they don't
require the overhead of a process and connection for each idle
connection, so I would recommend a connection pooler even with an
ACP.  They cover overlapping ground, but I see them as more
complementary than competing.

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2009-12-28 21:59:24
Subject: Re: Application name patch - v3
Previous:From: Dimitri FontaineDate: 2009-12-28 21:53:02
Subject: Re: Admission Control Policy

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group