Expand description
A pure decoder for the pgoutput logical-replication protocol, version 1
(the binary messages pg_logical_slot_peek_binary_changes returns with
proto_version '1'), and Stream, which groups the decoded changes by
source transaction.
Integers are big-endian; strings are NUL-terminated and assumed UTF-8 (a
UTF8 server encoding); tuple values arrive in text form.
Structs§
- Column
- A column of a
Relationmessage. - Relation
- A
Relationmessage: the shape of the tuples of relationid. - Stream
- Groups a sequence of messages (one decoding session) into committed
transactions. A transaction still open at the end is not in
done. - Txn
- A committed source transaction: its row changes (
Insert,Update,DeleteandTruncatemessages, in order) and its commit’s end LSN.
Enums§
- Datum
- One column value of a tuple.
- Decode
Error - A malformed or unexpected
pgoutputmessage. - Message
- A decoded
pgoutputmessage.
Functions§
- decode
- Decode one
pgoutput(protocol 1) message. - format_
lsn - An LSN in Postgres’
X/Ytext form. - parse_
lsn - Parse an LSN from Postgres’
X/Ytext form.