Connection handling of Postgre under PHP
Connection handling of Postgre under PHP
От:
stefan_landgraf@gmx.de (Stefan Landgraf)
Дата:
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
Re: Connection handling of Postgre under PHP
От:
ljb <lbayuk@mindspring.com>
Дата:
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.
Re: Connection handling of Postgre under PHP
От:
"Michael Ben-David" <nospam_mikebd@iname.com_mapson>
Дата:
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" wrote in message news:7eb71af2.0203120251.4deecafb@posting.google.com... > 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