feat: protocol negotiation - #457
Merged
Merged
Conversation
Following libpq, add a 3.9999 test version to request the newest minor version a server supports and exercise the negotiation path: - Config::protocol_version selects the version advertised in the startup message (default 3.0), including PROTOCOL3_9999 - StartupHandler::on_negotiate_protocol_version handles the server's NegotiateProtocolVersion response, understanding both the full 32-bit version form (PostgreSQL 18+, pgwire) and the minor-only form used by older servers, and adopts the negotiated version for the connection - PgWireClient now primes its decode context with the advertised version, so a 4-byte protocol 3.0 cancel key decodes as SecretKey::I32 instead of SecretKey::Bytes
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.
protocol negotiation for client api