Skip to content

Use unnamed statement in pg when not persistent #3863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ThomWright
Copy link

@ThomWright ThomWright commented May 16, 2025

This change makes Postgres use the unnamed statement when preparing statements and persistent = false.

This means Postgres will automatically close the prepared statement when another query is run – as per the docs – avoiding a memory leak.

Does your PR solve an issue?

fixes #3850

Is this a breaking change?

No.

it fixes a bug, and makes it behave as documented.

This will automatically close the prepared statement when
another query is run, avoiding a memory leak.
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.

Non-persistent prepared statements not closed in PostgreSQL
1 participant