Skip to content

ext/pdo_pgsql: Collect nonpersistent notice callback cycles - #449

Open
iliaal wants to merge 1 commit into
PHP-8.4from
fix/aph-pdo-pgsql-callback-gc-84
Open

iliaal wants to merge 1 commit into
PHP-8.4from
fix/aph-pdo-pgsql-callback-gc-84

Conversation

@iliaal

@iliaal iliaal commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Found while preparing php#25156: a notice callback capturing its nonpersistent PDO connection leaks after external references are dropped and GC runs. PDO_PGSQL now reports these callbacks to GC so the cycles can be collected.

Persistent callbacks remain owned by the cached connection and are excluded to avoid reporting the same callback through multiple PDO wrappers.

Expose the notice callback to GC so cycles involving a nonpersistent PDO
connection can be collected. Persistent callbacks remain owned by the
cached connection and must not be reported by each PDO wrapper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant