note 36332 added to function.pg-pconnect

From: Date: Mon, 06 Oct 2003 08:05:57 +0000
Subject: note 36332 added to function.pg-pconnect
Groups: php.notes 
Request: Send a blank email to php-notes+get-57881@lists.php.net to get a copy of this message
A contribution to the transaction issue raised by "garrett at bgb dot cc". In a German book about PostgreSQL in connection with PHP (Cornelia Boenigk, PostgreSQL - Grundlagen, Praxis, Anwendungsentwicklung mit PHP) one can read in chapter 19.3 about persistent connections: If the page processing aborts and the transaction is not finished yet, the next script using the same persistent connection will be considered as the continuation of the transaction. In particular a lock of a table will persist. The explanation is as follows: After the abort of the script no COMMIT or ROLLBACK was sent to the db server. The author describes a hint to avoid the scenario above: You can create a function for resolving transactions and locks erroneously not closed. For invoking the function after execution of a script it has to be registered with the function register_shutdown_function(): http://de2.php.net/manual/en/function.register-shutdown-function.php ---- Manual Page -- http://www.php.net/manual/en/function.pg-pconnect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36332 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36332&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36332&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#57881) next »