Edit report at https://bugs.php.net/bug.php?id=63365&edit=1
ID: 63365 Updated by: fel...@php.net Reported by: chris at ctgameinfo dot com Summary: pg_send_query() blocks on queries to other connections. -Status: Open +Status: Feedback Type: Bug Package: PostgreSQL related Operating System: FreeBSD (probably irrevelant) PHP Version: 5.4.8 Block user comment: N Private report: N New Comment: Please, check out the return from pg_last_error($dbconn); after the pg_send_query() call and post the result in there. Previous Comments: ------------------------------------------------------------------------ [2012-10-25 20:58:13] chris at ctgameinfo dot com 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 this bug report at https://bugs.php.net/bug.php?id=63365&edit=1