MCPcopy Create free account
hub / github.com/apache/cloudberry / logicalrep_read_stream_commit

Function logicalrep_read_stream_commit

src/backend/replication/logical/proto.c:850–870  ·  view source on GitHub ↗

* Read STREAM COMMIT from the output stream. */

Source from the content-addressed store, hash-verified

848 * Read STREAM COMMIT from the output stream.
849 */
850TransactionId
851logicalrep_read_stream_commit(StringInfo in, LogicalRepCommitData *commit_data)
852{
853 TransactionId xid;
854 uint8 flags;
855
856 xid = pq_getmsgint(in, 4);
857
858 /* read flags (unused for now) */
859 flags = pq_getmsgbyte(in);
860
861 if (flags != 0)
862 elog(ERROR, "unrecognized flags %u in commit message", flags);
863
864 /* read fields */
865 commit_data->commit_lsn = pq_getmsgint64(in);
866 commit_data->end_lsn = pq_getmsgint64(in);
867 commit_data->committime = pq_getmsgint64(in);
868
869 return xid;
870}
871
872/*
873 * Write STREAM ABORT to the output stream. Note that xid and subxid will be

Callers 1

Calls 3

pq_getmsgintFunction · 0.85
pq_getmsgbyteFunction · 0.85
pq_getmsgint64Function · 0.85

Tested by

no test coverage detected