Do not invoke sync command while preparing unnamed prepared statement#759
Closed
mkabilov wants to merge 3 commits intolib:masterfrom
Closed
Do not invoke sync command while preparing unnamed prepared statement#759mkabilov wants to merge 3 commits intolib:masterfrom
mkabilov wants to merge 3 commits intolib:masterfrom
Conversation
|
Hi, is there any particular reason why this patch was not merged? We are experiencing issues described in #889 and after applying this patch it looks like the errors are gone. We are still investigating if this breaks anything else, but would be nice to hear from the maintainers. |
This comment was marked as spam.
This comment was marked as spam.
# Conflicts: # conn.go
exfly
added a commit
to exfly/pq
that referenced
this pull request
Jun 13, 2025
exfly
added a commit
to exfly/pq
that referenced
this pull request
Jun 13, 2025
exfly
added a commit
to exfly/pq
that referenced
this pull request
Jun 13, 2025
arp242
pushed a commit
to exfly/pq
that referenced
this pull request
Dec 31, 2025
Collaborator
|
How can this be tested? I added pgbouncer to the CI a few weeks ago, and all tests seem to work? I added |
Author
|
I think at this point someone had already fixed the issue with connection poolers. and in case it is not fixed, here is the workaround: use "binary_parameters=yes" as stated here: #889 (comment) or use https://github.com/jackc/pgx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current implementation of the execution of the queries with arguments (i.e. non-simpleQueries) implicitly creates unnamed prepared statement followed by execute command; both done in the separate transactions (by invoking Sync after prepare).
This might be an issue if one uses a connection pooler in a transaction pool mode like pgbouncer or odyssey
Fixes #889