Re: Connection Pooling, a year later - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Connection Pooling, a year later
Date
Msg-id 200112180449.fBI4n6i13995@candle.pha.pa.us
Whole thread Raw
In response to Connection Pooling, a year later  (Michael Owens <owensmk@earthlink.net>)
Responses Re: Connection Pooling, a year later
List pgsql-hackers
> If implemented, surely the best place to put it would be in libpq?  You
> could always add a function to lib pq to create a 'pooled' connection,
> rather than a normal connection.  Basically then the PHP guys would just use
> that instead of their own pg_connect function.  I guess it would mean that
> lots of people who use the pgsql client wouldn't have to rewrite their own
> connection sharing code.
> 
> However, where would you put all the options for the pool?  Like max
> processes, min processes, etc.
> 
> I have learnt that half the problem with connection pooling is transactions
> that fail to be rolled back...

The trick for that is to call COMMIT before you pass the backend to a
new person.  Now, if you want to abort a left-over transaction, you can
do an ABORT but that is going to show up in the server logs because an
ABORT without a transaction causes an error message.

We also have RESET ALL for connection pooling use.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Connection Pooling, a year later
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Connection Pooling, a year later