Expand description
Bookmark <-> JSON serialization for replication slot LSN progress.
Bookmark shape (round-trips through serde_json::Value):
{ "last_lsn": "0/16A4F88" }last_lsn is the end_lsn of the last committed transaction whose
change records have been written to the sink — the WAL position immediately
after that commit record, i.e. exactly where the next START_REPLICATION
resumes. (It is the commit’s end_lsn, not its commit_lsn; see the
persist site in stream.rs.)
Structs§
- Bookmark
- Durable bookmark for a
PostgresCdcSource.
Functions§
- format_
lsn - Format a
u64LSN into Postgres’XXXXXXXX/XXXXXXXXtext form, dropping leading zeros from each half (matchespg_lsn::out). - parse_
lsn - Parse
XXXX/XXXX(case-insensitive hex, no leading zeros required) into au64. ReturnsFaucetError::Stateon any malformation. - state_
key - Generate the
state_keyfor a given replication slot.