Skip to main content

Module conn

Module conn 

Source
Expand description

Minimal PostgreSQL wire-protocol client for the replication connection.

The published tokio-postgres cannot open a replication=database session, so this module implements just enough of the protocol: startup, authentication (trust / cleartext / MD5 / SCRAM-SHA-256), simple queries, and the CopyBoth stream used by START_REPLICATION. Message encoding/decoding is delegated to postgres-protocol.

Structs§

ReplicationConnection
SimpleResult
A decoded simple-query result set.

Traits§

AsyncReadWrite

Functions§

stream_error_kind
Errors on the replication connection that mean the slot can no longer deliver every transaction: the slot was invalidated (max_slot_wal_keep_size) or its WAL is gone. Both need a resynchronisation, not a retry.