Re: Connection Pooling, a year later

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: mlw <markw(at)mohawksoft(dot)com>, owensmk(at)earthlink(dot)net, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Connection Pooling, a year later
Date: 2001-12-18 04:49:06
Message-ID: 200112180449.fBI4n6i13995@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Pritchard 2001-12-18 06:06:40 Re: Connection Pooling, a year later
Previous Message Christopher Kings-Lynne 2001-12-18 04:42:55 Re: Connection Pooling, a year later