Re: persistent db connections in PHP

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: persistent db connections in PHP
Date: 2007-06-20 19:43:10
Message-ID: 4679834E.2050701@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


lawpoop(at)gmail(dot)com wrote:
> However, with this new Postgres site, I don't have access to my temp
> tables after I've traversed another pg_connect. So PHP is either
> creating a new connection, or giving me another session, not the one
> which I created my tables in.

You wouldn't expect to be given back the same connection (and hence the
same temp tables) from a pool of connections - they're returned randomly.

Scott Marlowe wrote:
> MySQL reuses old connections within the same script. PostgreSQL's php
> extension does not, it starts a new connection each time.

Isn't pg_pconnect supposed to recycle a pooled connection?

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
---------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2007-06-20 19:45:33 Re: On managerial choosing (was: Postgres VS Oracle)
Previous Message Shoaib Mir 2007-06-20 19:40:30 Re: Running OS-level programs from Postgres?