#42450 [Com]: pdo_pgsql: persistent connections fails on PostgreSQL server restart
| From: | pierre-alain dot bourdil at c-s dot fr | Date: | Mon, 17 Nov 2008 09:32:00 +0000 |
| Subject: | #42450 [Com]: pdo_pgsql: persistent connections fails on PostgreSQL server restart | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-131015@lists.php.net to get a copy of this message | ||
ID: 42450
Comment by: pierre-alain dot bourdil at c-s dot fr
Reported By: davojan at mail dot ru
Status: Open
Bug Type: PDO related
Operating System: *
PHP Version: 5.2.4
New Comment:
I've got the same problem using php5.1.6
Previous Comments:
------------------------------------------------------------------------
[2007-08-31 05:15:21] davojan at mail dot ru
The same problem in php-5.2.4 release. Checked under WinXP.
------------------------------------------------------------------------
[2007-08-28 09:15:15] davojan at mail dot ru
New information: not only the first try. Rather first try to use of any
of the old (being created before restart) persistent connections fails.
P.S.: Sorry for my English. I hope you understand me :)
------------------------------------------------------------------------
[2007-08-28 08:14:12] davojan at mail dot ru
I've tried the latest version under WinXP. The first try to open
persistent connection after PostgreSQL server restart fails in the same
way as above. The following connections is OK.
Could you please repair the first connection too? :)
------------------------------------------------------------------------
[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