Skip to content

feat: protocol negotiation - #457

Merged
sunng87 merged 6 commits into
masterfrom
feature/client-protocol-negotiation
Aug 16, 2026
Merged

feat: protocol negotiation#457
sunng87 merged 6 commits into
masterfrom
feature/client-protocol-negotiation

Conversation

@sunng87

@sunng87 sunng87 commented Aug 16, 2026

Copy link
Copy Markdown
Owner

protocol negotiation for client api

sunng87 and others added 6 commits August 16, 2026 11:10
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
@sunng87
sunng87 merged commit b2ee579 into master Aug 16, 2026
10 checks passed
@sunng87
sunng87 deleted the feature/client-protocol-negotiation branch August 16, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant