-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Description
Description
ext/pgsql sets a notice processor callback on connection in ext/pgsql/pgsql.c on or around line 820.
When using persistent connections with pg_pconnect, if a notice is received while a connection isn't in use (ie. in the pool), the callback libpg was provided with (_php_pgsql_notice_handler) will attempt to access its parameter link even through it is not valid anymore as it was scoped to the request.
Upon clearing (likely in _rollback_transactions) the notice processor should be set to a no-op handler.
(note: passing NULL to PQsetNoticeProcessor will not do anything except return the previous callback).
PHP Version
PHP 8.4.11 (cli) (built: Aug 12 2025 02:25:03) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.11, Copyright (c) Zend Technologies
with Zend OPcache v8.4.11, Copyright (c), by Zend Technologies
Operating System
Linux