Repository navigation
Backport #116998 to 26.3: Bound PostgreSQL protocol messages by their declared size - #120824
Merged
Merged
Conversation
… declared size
Contributor
|
Workflow [BackportPR], commit [d0d595c] Summary: ✅ |
alexey-milovidov
added a commit
that referenced
this pull request
Sep 19, 2026
Resolve the conflicts in `src/Core/PostgreSQLProtocol.h` and `src/Core/tests/gtest_postgresql_protocol.cpp`. 26.8 does not have the `FrontMessage::deserializePayload` helper that the original pull request builds on, so the helper is brought in as part of this backport, together with the `Query` and `Sync` framing checks that the new `gtest` cases exercise. The remaining hunks apply to the 26.8 sources unchanged. The result is identical to the already merged 26.3 backport #120824 apart from the `= 0` initializers that 26.8 already carries. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
alexey-milovidov
added a commit
that referenced
this pull request
Sep 19, 2026
…ypick/26.7/116998 Resolve the cherry-pick of #116998 onto 26.7. Conflicts: src/Core/PostgreSQLProtocol.h src/Core/tests/gtest_postgresql_protocol.cpp 26.7 does not have the `deserializePayload` helper that master gained in `Keep PostgreSQL messages aligned after parse errors`, and the fix being backported is only meaningful when the frontend messages are actually read through it. The resolution therefore brings in the helper together with the message conversions it enables (`Terminate`, `SASLInitialResponse`, `SASLResponse`, `PasswordMessage`, `Query`, `Sync`, both `CopyData` variants) and the `readStringOfDeclaredSize` reader, i.e. exactly the resolution that was already merged for 26.3 in #120824. 26.7-only differences are kept: the memory-tracking containers (`UnorderedMapWithMemoryTracking`, `VectorWithMemoryTracking`) and the explicitly initialized members outside the rewritten blocks. Master-only changes unrelated to this fix - the `scram_sha256_password` salt selection in `ScrambleSHA256Auth` - are not pulled in; only `expectPasswordMessage` and its two call sites, which belong to this fix, are. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Original pull-request #116998
Cherry-pick pull-request #120033
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.
The PR source
The PR is created in the CI job
Version info
26.3.33.112