176 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
177 errmsg(
"logical decoding on standby requires \"wal_level\" >= \"logical\" on the primary")));
193 elog(
ERROR,
"unexpected RM_XLOG_ID record type: %u", info);
351 elog(
ERROR,
"unexpected RM_XACT_ID record type: %u", info);
397 elog(
ERROR,
"unexpected RM_STANDBY_ID record type: %u", info);
456 elog(
ERROR,
"unexpected RM_HEAP2_ID record type: %u", info);
537 elog(
ERROR,
"unexpected RM_HEAP_ID record type: %u", info);
593 elog(
ERROR,
"unexpected RM_LOGICALMSG_ID record type: %u", info);
714 buf->origptr,
buf->endptr);
725 commit_time, origin_id, origin_lsn,
731 commit_time, origin_id, origin_lsn);
777 buf->endptr, prepare_time, origin_id,
811 buf->origptr,
buf->endptr);
865 abort_time, origin_id, origin_lsn,
873 buf->record->EndRecPtr, abort_time);
1099 buf->origptr, change,
false);
1141 Assert(tupledata != NULL);
1199 buf->origptr, change,
false);
1268 memcpy((
char *) &xlhdr,
#define Assert(condition)
static bool DecodeTXNNeedSkip(LogicalDecodingContext *ctx, XLogRecordBuffer *buf, Oid txn_dbid, RepOriginId origin_id)
void heap2_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
static void DecodeAbort(LogicalDecodingContext *ctx, XLogRecordBuffer *buf, xl_xact_parsed_abort *parsed, TransactionId xid, bool two_phase)
static bool FilterPrepare(LogicalDecodingContext *ctx, TransactionId xid, const char *gid)
static void DecodeMultiInsert(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
void LogicalDecodingProcessRecord(LogicalDecodingContext *ctx, XLogReaderState *record)
static void DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf, xl_xact_parsed_commit *parsed, TransactionId xid, bool two_phase)
static void DecodeDelete(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
void heap_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
static void DecodeXLogTuple(char *data, Size len, HeapTuple tuple)
void xlog_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
void xact_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
void standby_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
static bool FilterByOrigin(LogicalDecodingContext *ctx, RepOriginId origin_id)
static void DecodeInsert(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
static void DecodeTruncate(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
void logicalmsg_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
static void DecodeUpdate(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
static void DecodePrepare(LogicalDecodingContext *ctx, XLogRecordBuffer *buf, xl_xact_parsed_prepare *parsed)
static void DecodeSpecConfirm(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define XLH_INSERT_ON_TOAST_RELATION
#define XLOG_HEAP2_MULTI_INSERT
#define XLOG_HEAP_HOT_UPDATE
#define XLH_INSERT_IS_SPECULATIVE
#define XLOG_HEAP2_REWRITE
#define XLOG_HEAP_TRUNCATE
#define XLH_UPDATE_CONTAINS_NEW_TUPLE
#define XLH_INSERT_LAST_IN_MULTI
#define XLH_UPDATE_CONTAINS_OLD
#define XLH_TRUNCATE_RESTART_SEQS
#define XLH_DELETE_CONTAINS_OLD
#define XLOG_HEAP2_PRUNE_VACUUM_SCAN
#define XLOG_HEAP_INPLACE
#define XLOG_HEAP2_LOCK_UPDATED
#define SizeOfMultiInsertTuple
#define XLOG_HEAP2_PRUNE_ON_ACCESS
#define XLOG_HEAP2_NEW_CID
#define XLOG_HEAP2_PRUNE_VACUUM_CLEANUP
#define XLH_TRUNCATE_CASCADE
#define XLH_DELETE_IS_SUPER
#define XLOG_HEAP2_VISIBLE
#define XLH_INSERT_CONTAINS_NEW_TUPLE
#define XLOG_HEAP_CONFIRM
#define SizeofHeapTupleHeader
static void ItemPointerSetInvalid(ItemPointerData *pointer)
void UpdateDecodingStats(LogicalDecodingContext *ctx)
bool filter_prepare_cb_wrapper(LogicalDecodingContext *ctx, TransactionId xid, const char *gid)
bool filter_by_origin_cb_wrapper(LogicalDecodingContext *ctx, RepOriginId origin_id)
#define XLOG_LOGICAL_MESSAGE
#define XLOG_RESTORE_POINT
#define XLOG_CHECKPOINT_REDO
#define XLOG_OVERWRITE_CONTRECORD
#define XLOG_FPI_FOR_HINT
#define XLOG_CHECKPOINT_SHUTDOWN
#define XLOG_PARAMETER_CHANGE
#define XLOG_CHECKPOINT_ONLINE
#define XLOG_END_OF_RECOVERY
void ReorderBufferXidSetCatalogChanges(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn)
ReorderBufferChange * ReorderBufferGetChange(ReorderBuffer *rb)
void ReorderBufferAbort(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn, TimestampTz abort_time)
Oid * ReorderBufferGetRelids(ReorderBuffer *rb, int nrelids)
HeapTuple ReorderBufferGetTupleBuf(ReorderBuffer *rb, Size tuple_len)
void ReorderBufferInvalidate(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn)
void ReorderBufferQueueChange(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn, ReorderBufferChange *change, bool toast_insert)
void ReorderBufferPrepare(ReorderBuffer *rb, TransactionId xid, char *gid)
void ReorderBufferForget(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn)
void ReorderBufferCommitChild(ReorderBuffer *rb, TransactionId xid, TransactionId subxid, XLogRecPtr commit_lsn, XLogRecPtr end_lsn)
void ReorderBufferSkipPrepare(ReorderBuffer *rb, TransactionId xid)
void ReorderBufferAddInvalidations(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn, Size nmsgs, SharedInvalidationMessage *msgs)
void ReorderBufferQueueMessage(ReorderBuffer *rb, TransactionId xid, Snapshot snap, XLogRecPtr lsn, bool transactional, const char *prefix, Size message_size, const char *message)
void ReorderBufferFinishPrepared(ReorderBuffer *rb, TransactionId xid, XLogRecPtr commit_lsn, XLogRecPtr end_lsn, XLogRecPtr two_phase_at, TimestampTz commit_time, RepOriginId origin_id, XLogRecPtr origin_lsn, char *gid, bool is_commit)
void ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid, XLogRecPtr commit_lsn, XLogRecPtr end_lsn, TimestampTz commit_time, RepOriginId origin_id, XLogRecPtr origin_lsn)
bool ReorderBufferRememberPrepareInfo(ReorderBuffer *rb, TransactionId xid, XLogRecPtr prepare_lsn, XLogRecPtr end_lsn, TimestampTz prepare_time, RepOriginId origin_id, XLogRecPtr origin_lsn)
void ReorderBufferImmediateInvalidation(ReorderBuffer *rb, uint32 ninvalidations, SharedInvalidationMessage *invalidations)
void ReorderBufferProcessXid(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn)
void ReorderBufferAssignChild(ReorderBuffer *rb, TransactionId xid, TransactionId subxid, XLogRecPtr lsn)
void ReorderBufferAbortOld(ReorderBuffer *rb, TransactionId oldestRunningXid)
@ REORDER_BUFFER_CHANGE_INTERNAL_SPEC_CONFIRM
@ REORDER_BUFFER_CHANGE_INSERT
@ REORDER_BUFFER_CHANGE_INTERNAL_SPEC_ABORT
@ REORDER_BUFFER_CHANGE_INTERNAL_SPEC_INSERT
@ REORDER_BUFFER_CHANGE_TRUNCATE
@ REORDER_BUFFER_CHANGE_DELETE
@ REORDER_BUFFER_CHANGE_UPDATE
bool SnapBuildXactNeedsSkip(SnapBuild *builder, XLogRecPtr ptr)
bool SnapBuildProcessChange(SnapBuild *builder, TransactionId xid, XLogRecPtr lsn)
XLogRecPtr SnapBuildGetTwoPhaseAt(SnapBuild *builder)
SnapBuildState SnapBuildCurrentState(SnapBuild *builder)
Snapshot SnapBuildGetOrBuildSnapshot(SnapBuild *builder)
void SnapBuildSerializationPoint(SnapBuild *builder, XLogRecPtr lsn)
void SnapBuildCommitTxn(SnapBuild *builder, XLogRecPtr lsn, TransactionId xid, int nsubxacts, TransactionId *subxacts, uint32 xinfo)
void SnapBuildProcessNewCid(SnapBuild *builder, TransactionId xid, XLogRecPtr lsn, xl_heap_new_cid *xlrec)
void SnapBuildProcessRunningXacts(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *running)
@ SNAPBUILD_FULL_SNAPSHOT
#define XLOG_INVALIDATIONS
#define XLOG_STANDBY_LOCK
#define XLOG_RUNNING_XACTS
struct SnapBuild * snapshot_builder
OutputPluginCallbacks callbacks
struct ReorderBuffer * reorder
LogicalDecodeFilterPrepareCB filter_prepare_cb
LogicalDecodeFilterByOriginCB filter_by_origin_cb
ReorderBufferChangeType action
bool clear_toast_afterwards
struct ReorderBufferChange::@109::@111 truncate
struct ReorderBufferChange::@109::@110 tp
union ReorderBufferChange::@109 data
ReplicationSlotPersistentData data
void(* rm_decode)(struct LogicalDecodingContext *ctx, struct XLogRecordBuffer *buf)
Oid relids[FLEXIBLE_ARRAY_MEMBER]
char message[FLEXIBLE_ARRAY_MEMBER]
TransactionId oldestRunningXid
SharedInvalidationMessage msgs[FLEXIBLE_ARRAY_MEMBER]
TransactionId twophase_xid
char twophase_gid[GIDSIZE]
TimestampTz origin_timestamp
TransactionId twophase_xid
TimestampTz origin_timestamp
char twophase_gid[GIDSIZE]
#define TransactionIdIsValid(xid)
#define XLOG_XACT_COMMIT_PREPARED
#define XLOG_XACT_INVALIDATIONS
#define XACT_XINFO_HAS_ORIGIN
#define XLOG_XACT_PREPARE
#define XLOG_XACT_ASSIGNMENT
#define XLOG_XACT_ABORT_PREPARED
void ParseCommitRecord(uint8 info, xl_xact_commit *xlrec, xl_xact_parsed_commit *parsed)
void ParseAbortRecord(uint8 info, xl_xact_abort *xlrec, xl_xact_parsed_abort *parsed)
void ParsePrepareRecord(uint8 info, xl_xact_prepare *xlrec, xl_xact_parsed_prepare *parsed)
bool RecoveryInProgress(void)
static RmgrData GetRmgr(RmgrId rmid)
#define InvalidXLogRecPtr
char * XLogRecGetBlockData(XLogReaderState *record, uint8 block_id, Size *len)
void XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id, RelFileLocator *rlocator, ForkNumber *forknum, BlockNumber *blknum)
#define XLogRecGetOrigin(decoder)
#define XLogRecGetDataLen(decoder)
#define XLogRecGetInfo(decoder)
#define XLogRecGetRmid(decoder)
#define XLogRecGetData(decoder)
#define XLogRecGetXid(decoder)
#define XLogRecGetTopXid(decoder)