PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/transam.h"
#include "access/xact.h"
#include "storage/sinval.h"
#include "storage/standbydefs.h"
#include "utils/timestamp.h"
Go to the source code of this file.
Functions | |
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) |
static void | xact_desc_relations (StringInfo buf, char *label, int nrels, RelFileNode *xnodes) |
static void | xact_desc_subxacts (StringInfo buf, int nsubxacts, TransactionId *subxacts) |
static void | xact_desc_commit (StringInfo buf, uint8 info, xl_xact_commit *xlrec, RepOriginId origin_id) |
static void | xact_desc_abort (StringInfo buf, uint8 info, xl_xact_abort *xlrec) |
static void | xact_desc_prepare (StringInfo buf, uint8 info, xl_xact_prepare *xlrec) |
static void | xact_desc_assignment (StringInfo buf, xl_xact_assignment *xlrec) |
void | xact_desc (StringInfo buf, XLogReaderState *record) |
const char * | xact_identify (uint8 info) |
void ParseAbortRecord | ( | uint8 | info, |
xl_xact_abort * | xlrec, | ||
xl_xact_parsed_abort * | parsed | ||
) |
Definition at line 129 of file xactdesc.c.
References xl_xact_dbinfo::dbId, xl_xact_parsed_abort::dbId, MinSizeOfXactAbort, MinSizeOfXactRelfilenodes, MinSizeOfXactSubxacts, xl_xact_relfilenodes::nrels, xl_xact_parsed_abort::nrels, xl_xact_subxacts::nsubxacts, xl_xact_parsed_abort::nsubxacts, xl_xact_origin::origin_lsn, xl_xact_parsed_abort::origin_lsn, xl_xact_origin::origin_timestamp, xl_xact_parsed_abort::origin_timestamp, strlcpy(), xl_xact_subxacts::subxacts, xl_xact_parsed_abort::subxacts, xl_xact_dbinfo::tsId, xl_xact_parsed_abort::tsId, xl_xact_parsed_abort::twophase_gid, xl_xact_parsed_abort::twophase_xid, xl_xact_abort::xact_time, xl_xact_parsed_abort::xact_time, XACT_XINFO_HAS_DBINFO, XACT_XINFO_HAS_GID, XACT_XINFO_HAS_ORIGIN, XACT_XINFO_HAS_RELFILENODES, XACT_XINFO_HAS_SUBXACTS, XACT_XINFO_HAS_TWOPHASE, xl_xact_twophase::xid, xl_xact_xinfo::xinfo, xl_xact_parsed_abort::xinfo, XLOG_XACT_HAS_INFO, xl_xact_relfilenodes::xnodes, and xl_xact_parsed_abort::xnodes.
Referenced by DecodeXactOp(), recoveryStopsAfter(), recoveryStopsBefore(), xact_desc_abort(), and xact_redo().
void ParseCommitRecord | ( | uint8 | info, |
xl_xact_commit * | xlrec, | ||
xl_xact_parsed_commit * | parsed | ||
) |
Definition at line 34 of file xactdesc.c.
References xl_xact_dbinfo::dbId, xl_xact_parsed_commit::dbId, MinSizeOfXactCommit, MinSizeOfXactInvals, MinSizeOfXactRelfilenodes, MinSizeOfXactSubxacts, xl_xact_invals::msgs, xl_xact_parsed_commit::msgs, xl_xact_invals::nmsgs, xl_xact_parsed_commit::nmsgs, xl_xact_relfilenodes::nrels, xl_xact_parsed_commit::nrels, xl_xact_subxacts::nsubxacts, xl_xact_parsed_commit::nsubxacts, xl_xact_origin::origin_lsn, xl_xact_parsed_commit::origin_lsn, xl_xact_origin::origin_timestamp, xl_xact_parsed_commit::origin_timestamp, strlcpy(), xl_xact_subxacts::subxacts, xl_xact_parsed_commit::subxacts, xl_xact_dbinfo::tsId, xl_xact_parsed_commit::tsId, xl_xact_parsed_commit::twophase_gid, xl_xact_parsed_commit::twophase_xid, xl_xact_commit::xact_time, xl_xact_parsed_commit::xact_time, XACT_XINFO_HAS_DBINFO, XACT_XINFO_HAS_GID, XACT_XINFO_HAS_INVALS, XACT_XINFO_HAS_ORIGIN, XACT_XINFO_HAS_RELFILENODES, XACT_XINFO_HAS_SUBXACTS, XACT_XINFO_HAS_TWOPHASE, xl_xact_twophase::xid, xl_xact_xinfo::xinfo, xl_xact_parsed_commit::xinfo, XLOG_XACT_HAS_INFO, xl_xact_relfilenodes::xnodes, and xl_xact_parsed_commit::xnodes.
Referenced by DecodeXactOp(), recoveryStopsAfter(), recoveryStopsBefore(), xact_desc_commit(), and xact_redo().
void ParsePrepareRecord | ( | uint8 | info, |
xl_xact_prepare * | xlrec, | ||
xl_xact_parsed_prepare * | parsed | ||
) |
Definition at line 216 of file xactdesc.c.
References xl_xact_parsed_commit::abortnodes, xl_xact_prepare::database, xl_xact_parsed_commit::dbId, xl_xact_prepare::gidlen, MAXALIGN, xl_xact_parsed_commit::msgs, xl_xact_prepare::nabortrels, xl_xact_parsed_commit::nabortrels, xl_xact_prepare::ncommitrels, xl_xact_prepare::ninvalmsgs, xl_xact_parsed_commit::nmsgs, xl_xact_parsed_commit::nrels, xl_xact_prepare::nsubxacts, xl_xact_parsed_commit::nsubxacts, xl_xact_prepare::origin_lsn, xl_xact_parsed_commit::origin_lsn, xl_xact_prepare::origin_timestamp, xl_xact_parsed_commit::origin_timestamp, xl_xact_prepare::prepared_at, xl_xact_parsed_commit::subxacts, xl_xact_parsed_commit::twophase_gid, xl_xact_parsed_commit::twophase_xid, xl_xact_parsed_commit::xact_time, xl_xact_prepare::xid, and xl_xact_parsed_commit::xnodes.
Referenced by DecodeXactOp(), and xact_desc_prepare().
void xact_desc | ( | StringInfo | buf, |
XLogReaderState * | record | ||
) |
Definition at line 362 of file xactdesc.c.
References appendStringInfo(), InvalidOid, xl_xact_invals::msgs, xl_xact_invals::nmsgs, standby_desc_invalidations(), xact_desc_abort(), xact_desc_assignment(), xact_desc_commit(), xact_desc_prepare(), XLOG_XACT_ABORT, XLOG_XACT_ABORT_PREPARED, XLOG_XACT_ASSIGNMENT, XLOG_XACT_COMMIT, XLOG_XACT_COMMIT_PREPARED, XLOG_XACT_INVALIDATIONS, XLOG_XACT_OPMASK, XLOG_XACT_PREPARE, XLogRecGetData, XLogRecGetInfo, XLogRecGetOrigin, and xl_xact_assignment::xtop.
|
static |
Definition at line 315 of file xactdesc.c.
References appendStringInfo(), appendStringInfoString(), xl_xact_parsed_abort::nrels, xl_xact_parsed_abort::nsubxacts, ParseAbortRecord(), xl_xact_parsed_abort::subxacts, timestamptz_to_str(), TransactionIdIsValid, xl_xact_parsed_abort::twophase_xid, xact_desc_relations(), xact_desc_subxacts(), xl_xact_abort::xact_time, and xl_xact_parsed_abort::xnodes.
Referenced by xact_desc().
|
static |
Definition at line 351 of file xactdesc.c.
References appendStringInfo(), appendStringInfoString(), i, xl_xact_assignment::nsubxacts, and xl_xact_assignment::xsub.
Referenced by xact_desc().
|
static |
Definition at line 283 of file xactdesc.c.
References appendStringInfo(), appendStringInfoString(), xl_xact_parsed_commit::dbId, LSN_FORMAT_ARGS, xl_xact_parsed_commit::msgs, xl_xact_parsed_commit::nmsgs, xl_xact_parsed_commit::nrels, xl_xact_parsed_commit::nsubxacts, xl_xact_parsed_commit::origin_lsn, xl_xact_parsed_commit::origin_timestamp, ParseCommitRecord(), standby_desc_invalidations(), xl_xact_parsed_commit::subxacts, timestamptz_to_str(), TransactionIdIsValid, xl_xact_parsed_commit::tsId, xl_xact_parsed_commit::twophase_xid, xact_desc_relations(), xact_desc_subxacts(), xl_xact_commit::xact_time, XACT_XINFO_HAS_ORIGIN, XactCompletionForceSyncCommit, XactCompletionRelcacheInitFileInval, xl_xact_parsed_commit::xinfo, and xl_xact_parsed_commit::xnodes.
Referenced by xact_desc().
|
static |
Definition at line 332 of file xactdesc.c.
References xl_xact_parsed_commit::abortnodes, appendStringInfo(), appendStringInfoString(), xl_xact_parsed_commit::dbId, xl_xact_prepare::initfileinval, xl_xact_parsed_commit::msgs, xl_xact_parsed_commit::nabortrels, xl_xact_parsed_commit::nmsgs, xl_xact_parsed_commit::nrels, xl_xact_parsed_commit::nsubxacts, ParsePrepareRecord(), standby_desc_invalidations(), xl_xact_parsed_commit::subxacts, timestamptz_to_str(), xl_xact_parsed_commit::tsId, xl_xact_parsed_commit::twophase_gid, xact_desc_relations(), xact_desc_subxacts(), xl_xact_parsed_commit::xact_time, and xl_xact_parsed_commit::xnodes.
Referenced by xact_desc().
|
static |
Definition at line 251 of file xactdesc.c.
References appendStringInfo(), i, MAIN_FORKNUM, pfree(), and relpathperm.
Referenced by xact_desc_abort(), xact_desc_commit(), and xact_desc_prepare().
|
static |
Definition at line 270 of file xactdesc.c.
References appendStringInfo(), appendStringInfoString(), and i.
Referenced by xact_desc_abort(), xact_desc_commit(), and xact_desc_prepare().
const char* xact_identify | ( | uint8 | info | ) |
Definition at line 408 of file xactdesc.c.
References XLOG_XACT_ABORT, XLOG_XACT_ABORT_PREPARED, XLOG_XACT_ASSIGNMENT, XLOG_XACT_COMMIT, XLOG_XACT_COMMIT_PREPARED, XLOG_XACT_INVALIDATIONS, XLOG_XACT_OPMASK, and XLOG_XACT_PREPARE.