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

From Christopher Kings-Lynne
Subject Re: Connection Pooling, a year later
Date
Msg-id GNELIHDDFBOCMGBFGEFOIENICAAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Connection Pooling, a year later  (mlw <markw@mohawksoft.com>)
List pgsql-hackers
> If you have a web server and use (in PHP) pg_pConnect, you will get a
> postgresql process for each http process on your web servers.
>
> Beside memory, are there any real costs associated with having a
> good number of
> idle PostgreSQL processes sitting around?

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...

Chris



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Connection Pooling, a year later
Next
From: "Mark Pritchard"
Date:
Subject: Re: Connection Pooling, a year later