Expand description
PostgreSQL’s untagged pre-startup protocol.
These packets precede normal message framing. Encryption acceptance is a raw byte, and a successful negotiation changes the connection’s transport type.
Structs§
- Invalid
Encryption Reply - A raw encryption decision byte other than
S,N, or legacyE. - SslStrategy
- Actions needed to apply an
SslModeacross connection attempts.
Enums§
- Awaiting
GssReply - Client role awaits the server’s raw GSS encryption decision byte.
- Awaiting
SslReply - Client role awaits the server’s raw SSL decision byte.
- Certificate
Verification - Peer-certificate checks required by an SSL mode.
- Encryption
Reply - The server’s single-byte answer to an SSL request.
- GssHandshake
- GSS encryption was accepted and the transport must complete its handshake.
- Negotiation
- A reply whose branches deliberately have different typestates.
- PreStartup
- Connection awaits the client’s first untagged startup-family packet.
- PreStartup
Message - The external choice occupying a new connection’s untagged first packet.
- PreStartup
Offer - Server-role projection of the client’s first-packet external choice.
- Server
GssDecision - Server role must accept or reject a client’s
GSSENCRequest. - Server
SslDecision - Server role must accept or reject a client’s
SSLRequest. - SslMode
- libpq-compatible TLS negotiation policy.
- SslMode
Negotiation - SSL negotiation after applying plaintext-fallback policy.
- Startup
- A decoded
StartupMessageis ready for protocol validation. - Terminated
- Pre-startup processing terminated without entering a normal session.
- TlsHandshake
- SSL was accepted and the transport must complete a TLS handshake.
Constants§
- DEFAULT_
MAX_ PRE_ STARTUP_ PACKET_ LEN PostgreSQL’s maximum accepted untagged startup packet size.
Functions§
- decode_
pre_ startup - Incrementally decodes one raw pre-startup packet without consuming partial input.
- decode_
pre_ startup_ with_ limit - Incrementally decodes one raw pre-startup packet with an allocation bound.