Connection handling of Postgre under PHP

Started by Nonameabout 24 years ago3 messagesgeneral
Jump to latest
#1Noname
stefan_landgraf@gmx.de

Hi group!

When I use pg_pconnect(...) for connecting, is this connection
exclusively reserved for the actual script or can other scripts
running parallel use the same connection? I ask because I want to be
sure that no other process will interfere into running transactions...

Thanks for any suggestions.

Stefan Landgraf

#2Michael Ben-David
nospam_mikebd@iname.com_mapson
In reply to: Noname (#1)
Re: Connection handling of Postgre under PHP

I can't answer that but I did see a note in the phpPgAdmin source that the
author felt pg_pconnect() was a bit flaky and is sticking with pg_connect().

I am new to this so can't add further but you might want to investigate
more...

Cheers,
Mike.

"Stefan Landgraf" <stefan_landgraf@gmx.de> wrote in message
news:7eb71af2.0203120251.4deecafb@posting.google.com...

Show quoted text

Hi group!

When I use pg_pconnect(...) for connecting, is this connection
exclusively reserved for the actual script or can other scripts
running parallel use the same connection? I ask because I want to be
sure that no other process will interfere into running transactions...

Thanks for any suggestions.

Stefan Landgraf

#3ljb
lbayuk@mindspring.com
In reply to: Noname (#1)
Re: Connection handling of Postgre under PHP

stefan_landgraf@gmx.de wrote:

Hi group!

When I use pg_pconnect(...) for connecting, is this connection
exclusively reserved for the actual script or can other scripts
running parallel use the same connection? I ask because I want to be
sure that no other process will interfere into running transactions...

You can't do what you want, and it doesn't work the way you think.
Persistent connections gain you nothing in functionality as far as
scripts are concerned - it is purely a (supposed) performance issue.
Please read chapter 22 of the PHP manual, "Persistant Database Connections"
for more on this.