Repository navigation
Reduce PostgreSQL TCP buffering and extended-query cleanup round trips - #477
Open
marcelomendoncasoares wants to merge 4 commits into
Open
marcelomendoncasoares wants to merge 4 commits into
marcelomendoncasoares wants to merge 4 commits into
Conversation
This was referenced Oct 27, 2026
Author
|
Sorry for this PR out of the blue. I'm doing some performance improvement tests on |
marcelomendoncasoares
marked this pull request as ready for review
October 29, 2026 23:24
Author
|
Thanks for fixing the CHANGELOG here, @isoos! I have manually reviewed and only had to correct one small doc. Ready for your review when you have the time! |
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.
TCP connections now enable TCP_NODELAY before PostgreSQL startup and TLS negotiation when supported. Unix sockets skip the option, and failed socket setup closes the unowned socket.
Extended queries now send Close(portal) after Execute and before the same Sync. This removes the separate cleanup exchange inside transactions, including cleanup errors after already-queued queries commit or roll back. Queries still wait for ReadyForQuery and cancellation drain; named statement disposal, TLS policy, explicit transaction boundaries and row locks remain intact.
Validation covers exact message order, zero/many rows, named statement reuse, Parse/Bind/Execute errors, callback/SQL-error rollback, cancellation and connection reuse, stream subscription cancellation, row locks through commit/rollback, server-side COPY, binary/text logical replication, and real Unix/TLS transport. Linux getsockopt confirms TCP_NODELAY before SSLRequest, with base controls failing both new optimization assertions.