#42450 [Opn->Fbk]: PDO pgSql persistent connections fails on PostgreSQL server restart

From: Date: Mon, 27 Aug 2007 23:27:44 +0000
Subject: #42450 [Opn->Fbk]: PDO pgSql persistent connections fails on PostgreSQL server restart
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-116739@lists.php.net to get a copy of this message
ID: 42450 Updated by: iliaa@php.net Reported By: davojan at mail dot ru -Status: Open +Status: Feedback Bug Type: PostgreSQL related Operating System: FreeBSD and WinXP PHP Version: 5.2.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: ------------------------------------------------------------------------ [2007-08-27 20:56:27] davojan at mail dot ru Description: ------------ When using PDO pgSQL with persistent connections and restarting the PostgreSQL server, which the PDO has been connected with, PDO raises exception (see below). So I need to restart PHP to reset persistent connections. The bug was reproduced in two different environments: Apache2 (multi-threaded) + mod_php + WinXP lighttpd + PHP(FastCGI) + FreeBSD MySQL persistent connections in the same situation works fine... Reproduce code: --------------- <?php $db = new PDO( 'pgsql:host=localhost port=5432 dbname=test user=user password=secret', 'user', 'secret', array( PDO::ATTR_PERSISTENT => true ) ); echo 'ok'; ?> # /usr/local/etc/rc.d/postgresql restart and again the above php script Expected result: ---------------- ok Actual result: -------------- Unknown exception: SQLSTATE[57P01]: Admin shutdown: 7 FATAL: <closing connection on admin command> (this is my translation from russian message) server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42450&edit=1

« previous php.bugs (#116739) next »