From: chris at ctgameinfo dot com
Operating system: FreeBSD (probably irrevelant)
PHP version: 5.4.8
Package: PostgreSQL related
Bug Type: Bug
Bug description:pg_send_query() blocks on queries to other connections.
Description:
------------
If I open a connection and send a long running query with pg_send_query,
then
open a second connection and try to send a query over the second connection
with
pg_send_query it will block on the first connection's query not being
complete
Test script:
---------------
<?php
for($i=1;$i<=10;$i++)
{
echo "Interation $i\n";
$dbconn = pg_connect("user=pgsql dbname=postgres",
PGSQL_CONNECT_FORCE_NEW);
// Will block in the second loop interation
pg_send_query($dbconn, "select pg_sleep(5);");
}
?>
Expected result:
----------------
pg_send_query should only block on incomplete queries on the same
connection.
Actual result:
--------------
pg_send_query blocks on incomplete queries on any connection.
--
Edit bug report at https://bugs.php.net/bug.php?id=63365&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=63365&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=63365&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=63365&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=63365&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=63365&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63365&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=63365&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=63365&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=63365&r=support
Expected behavior: https://bugs.php.net/fix.php?id=63365&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=63365&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=63365&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=63365&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63365&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=63365&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=63365&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=63365&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63365&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63365&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=63365&r=mysqlcfg