Re: Number of connections

From: Raphael Bauduin <raphael(dot)bauduin(at)be(dot)easynet(dot)net>
To: David Busby <busby(at)pnts(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Number of connections
Date: 2003-05-18 12:28:59
Message-ID: 20030518122859.GA25073@raphael
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

A related mail I tried to post on the list yesterday but that I got
back....

when inserting a record in a PHP script, I sometimes use the currval
function on the corresponding sequence to get the id of the row
inserted.

Maybe a stupid question, but I wondered if when using persisten
connection, I could be sure there would be no problem. From the doc,
currval "Returns the value most recently obtained by nextval for this
sequence in the current server process."

Can you confirm me several script using the same persistent connection
in parallel are in separate server processes?

Thanks.

Raph

On Sat, May 17, 2003 at 11:53:44AM -0700, David Busby wrote:
> List,
> I cannot tell from the documentation if pg_pconnect() or pg_connect()
> are really different in how the connection pool is managed. Does anyone
> know if that is the case? Seems that using pg_pconnect would dictate "use a
> pooled connection" and pg_connect is "use a pooled connection, or make a new
> one". On "live" apps which is better to use, seems pg_pconnect. Thoughts?
>
> David Busby
> Systems Engineer
> busby(at)pnts(dot)com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Philipp Ottlinger 2003-05-18 13:25:10 Re: Number of connections
Previous Message David Busby 2003-05-17 18:53:44 Number of connections