Expand description
Domain newtypes for the Postgres logical-decoding connector.
Logical decoding threads several primitives of the same type, and a call
site can transpose them easily. The pgoutput Commit message carries two
adjacent PgLsn values, commit_lsn and end_lsn. Transaction ids and
commit timestamps are both i64, and they sit next to each other on a row.
relation_id is a bare u32 that the relation cache and every row event
share. A distinct newtype around each one turns a swapped argument into a
compile error, instead of silent offset or transaction corruption. See the
newtype guidance in the style guide.
Structsยง
- Commit
Lsn - LSN at which a transaction was committed. This is the pgoutput
Commit.commit_lsn. - EndLsn
- End-of-transaction LSN, the resume point after a commit. This is the
pgoutput
Commit.end_lsn. - Relation
Id - pgoutput relation identifier. It keys the relation cache and every row event.
- Transaction
Id - Postgres transaction id (
xid) carried by begin/commit and stamped onto each decoded row.