[php-src] PR #25156: ext/pdo_pgsql: Clear the notice callback when a persistent handle is released

From: Date: Mon, 02 Nov 2026 15:44:00 +0000
Subject: [php-src] PR #25156: ext/pdo_pgsql: Clear the notice callback when a persistent handle is released
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40233@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25156 Author: iliaal Pdo\Pgsql::setNoticeCallback() keeps a request-allocated fcall cache on the driver handle, and nothing drops it when a persistent handle outlives the request, so the next request on that connection runs the freed callback as soon as it receives a notice. The persistent_shutdown hook now clears it once the last object of the request releases the handle (refcount <= 2, the check pdo_dbh_free_storage() uses before rolling back). On PHP-8.6 and master a9138d768ad already applies that check in the caller, so the merge there drops the guard and adds the cleanup to the existing pdo_pgsql_request_shutdown().

« previous php.git-pulls (#40233) next »