fix: skip multi-statement SET validation in session mode#1094
Merged
0 commit merged intoJun 22, 2026
Merged
Conversation
Author
|
@CLAassistant signed |
Collaborator
|
Not sure what happened here. I think GitHub has yet another bug. I don't think I merged this and it doesn't appear in the git log. |
|
it's right here, you can cherry pick it, 9235234 still actual problem for me |
Collaborator
|
Could you please resubmit the PR? Thank you and sorry for the trouble. |
|
done #1119 |
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.
In session mode, PgDog should forward multi-statement queries to the server verbatim without validating whether they mix SET with other commands. The server owns the session and can handle mixed statements natively.
Root cause:
try_multi_set()unconditionally rejects any multi-statement query that mixes SET with non-SET statements (e.g., SHOW, SELECT). In session mode this validation is incorrect: there is no logical connection to pool, so mixed SET + other statements are perfectly valid.Fix: When the pool is in session mode,
try_multi_set()returnsOk(None), causing the query to fall through to normal processing and be forwarded to the server as-is.Example query that was previously rejected but now works:
Closed issues: Closes #1087