Persistent connections and transactions

From: Date: Thu, 25 Jan 2001 13:21:19 +0000
Subject: Persistent connections and transactions
Groups: php.general 
Request: Send a blank email to php-general+get-36608@lists.php.net to get a copy of this message
On the PostgreSQL lists there has been some discussion recently as to the mechanism behind, benefits and drawbacks, of persistent connections. In particular a scenario similar to the following was brought up: Browser A connects to Apache child N, and calls a web page that calls a script which issues SQL commands that involve opening and committing a transaction: - begin work; - do some selects, inserts, deletes, updates . . . Now, the question is: Is it conceivable that in the meantime, whilst Browser A is waiting for the output from the script, that Browser B talks to same Apache child, uses the same persistent connection, and messes up the transaction that Browser A initiated in some unpredictable way? - do more selects, inserts, deletes, updates . . . - commit work; My guess would be that the Apache child wouldn't allow Browser B to talk to it whilst Browser A is waiting for output from the script and that that means that everything is fine and hunky-dory . . . I'm not sure though, and there is nagging trace of murkiness. Cheers, Frank

« previous php.general (#36608) next »