[php-src] Issue #14769: set_time_limit() counts time while pg_get_result() waiting for asynchronous PostgreSQL query

From: Date: Tue, 02 Jul 2024 12:15:59 +0000
Subject: [php-src] Issue #14769: set_time_limit() counts time while pg_get_result() waiting for asynchronous PostgreSQL query
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247204@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14769 Author: lezso6 ### Description The following code: ```php <?php // Connect pg_connect("dbname='somedb'"); // Execute a postgres sleep query (or anything long running query) pg_send_query($conn, "SELECT pg_sleep(5)"); // Setting PHP max execution time less than above set_time_limit(2); // Waiting for query to complete (but fails and error is shown) $res = pg_get_result($conn); // Never printed echo "OK"; ``` Resulted in this output: ``` PHP Fatal error: maximum execution time of 2 seconds exceeded ``` But I expected this output instead: ``` OK ``` ### PHP Version 8.3.8 ### Operating System Gentoo Linux

« previous php.bugs (#247204) next »