|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Data Structures | |
| struct | WALOpenSegment |
| struct | WALSegmentContext |
| struct | XLogReaderRoutine |
| struct | DecodedBkpBlock |
| struct | DecodedXLogRecord |
| struct | XLogReaderState |
| struct | WALReadError |
Typedefs | |
| typedef struct WALOpenSegment | WALOpenSegment |
| typedef struct WALSegmentContext | WALSegmentContext |
| typedef struct XLogReaderState | XLogReaderState |
| typedef int(* | XLogPageReadCB) (XLogReaderState *xlogreader, XLogRecPtr targetPagePtr, int reqLen, XLogRecPtr targetRecPtr, char *readBuf) |
| typedef void(* | WALSegmentOpenCB) (XLogReaderState *xlogreader, XLogSegNo nextSegNo, TimeLineID *tli_p) |
| typedef void(* | WALSegmentCloseCB) (XLogReaderState *xlogreader) |
| typedef struct XLogReaderRoutine | XLogReaderRoutine |
| typedef struct DecodedXLogRecord | DecodedXLogRecord |
| typedef enum XLogPageReadResult | XLogPageReadResult |
| typedef struct WALReadError | WALReadError |
Enumerations | |
| enum | XLogPageReadResult { XLREAD_SUCCESS = 0 , XLREAD_FAIL = -1 , XLREAD_WOULDBLOCK = -2 } |
| #define XL_ROUTINE | ( | ... | ) | &(XLogReaderRoutine){__VA_ARGS__} |
Definition at line 117 of file xlogreader.h.
| #define XLogRecBlockImageApply | ( | decoder, | |
| block_id | |||
| ) | ((decoder)->record->blocks[block_id].apply_image) |
Definition at line 425 of file xlogreader.h.
Definition at line 419 of file xlogreader.h.
Definition at line 415 of file xlogreader.h.
Definition at line 416 of file xlogreader.h.
Definition at line 410 of file xlogreader.h.
Definition at line 413 of file xlogreader.h.
Definition at line 409 of file xlogreader.h.
Definition at line 411 of file xlogreader.h.
Definition at line 414 of file xlogreader.h.
Definition at line 408 of file xlogreader.h.
Definition at line 412 of file xlogreader.h.
Definition at line 417 of file xlogreader.h.
Definition at line 427 of file xlogreader.h.
Definition at line 423 of file xlogreader.h.
Definition at line 420 of file xlogreader.h.
Definition at line 418 of file xlogreader.h.
| typedef struct WALOpenSegment WALOpenSegment |
| typedef struct WALReadError WALReadError |
| typedef void(* WALSegmentCloseCB) (XLogReaderState *xlogreader) |
Definition at line 70 of file xlogreader.h.
| typedef void(* WALSegmentOpenCB) (XLogReaderState *xlogreader, XLogSegNo nextSegNo, TimeLineID *tli_p) |
Definition at line 67 of file xlogreader.h.
| typedef int(* XLogPageReadCB) (XLogReaderState *xlogreader, XLogRecPtr targetPagePtr, int reqLen, XLogRecPtr targetRecPtr, char *readBuf) |
Definition at line 62 of file xlogreader.h.
Definition at line 59 of file xlogreader.h.
| Enumerator | |
|---|---|
| XLREAD_SUCCESS | |
| XLREAD_FAIL | |
| XLREAD_WOULDBLOCK | |
Definition at line 349 of file xlogreader.h.
|
extern |
Definition at line 1701 of file xlogreader.c.
References Assert, BKPBLOCK_FORK_MASK, BKPBLOCK_HAS_DATA, BKPBLOCK_HAS_IMAGE, BKPBLOCK_SAME_REL, BKPIMAGE_APPLY, BKPIMAGE_COMPRESSED, BKPIMAGE_HAS_HOLE, COPY_HEADER_FIELD, DecodeXLogRecordRequiredSpace(), err(), fb(), i, DecodedBkpBlock::in_use, InvalidBuffer, InvalidReplOriginId, InvalidTransactionId, LSN_FORMAT_ARGS, MAXALIGN, memcpy(), remaining, report_invalid_record(), SizeOfXLogRecord, XLogRecord::xl_tot_len, XLR_BLOCK_ID_DATA_LONG, XLR_BLOCK_ID_DATA_SHORT, XLR_BLOCK_ID_ORIGIN, XLR_BLOCK_ID_TOPLEVEL_XID, and XLR_MAX_BLOCK_ID.
Referenced by XLogDecodeNextRecord(), and XLogInsertRecord().
Definition at line 1668 of file xlogreader.c.
References fb(), and XLR_MAX_BLOCK_ID.
Referenced by DecodeXLogRecord(), InitXLogInsert(), XLogInsertRecord(), and XLogReadRecordAlloc().
|
extern |
Definition at line 2095 of file xlogreader.c.
References DecodedBkpBlock::bkp_image, BKPIMAGE_COMPRESS_LZ4, BKPIMAGE_COMPRESS_PGLZ, BKPIMAGE_COMPRESS_ZSTD, BKPIMAGE_COMPRESSED, DecodedXLogRecord::blocks, PGAlignedBlock::data, fb(), DecodedBkpBlock::has_image, DecodedBkpBlock::in_use, LSN_FORMAT_ARGS, DecodedXLogRecord::max_block_id, memcpy(), MemSet, pglz_decompress(), XLogReaderState::ReadRecPtr, XLogReaderState::record, and report_invalid_record().
Referenced by GetWALBlockInfo(), verifyBackupPageConsistency(), XLogReadBufferForRedoExtended(), and XLogRecordSaveFPWs().
|
extern |
Definition at line 1533 of file xlogreader.c.
References Assert, buf, fb(), IOCONTEXT_NORMAL, IOOBJECT_WAL, IOOP_READ, pg_pread, pgstat_count_io_op_time(), pgstat_prepare_io_time(), pgstat_report_wait_end(), pgstat_report_wait_start(), track_wal_io_timing, XLByteInSeg, XLByteToSeg, and XLogSegmentOffset.
Referenced by logical_read_xlog_page(), read_local_xlog_page_guts(), summarizer_read_local_xlog_page(), WALDumpReadPage(), and XLogSendPhysical().
|
extern |
Definition at line 233 of file xlogreader.c.
References Assert, fb(), InvalidXLogRecPtr, ResetDecoder(), and XLogRecPtrIsValid.
Referenced by DecodingContextFindStartpoint(), extractPageMap(), findLastCheckpoint(), LogicalReplicationSlotCheckPendingWal(), LogicalSlotAdvanceAndCheckSnapState(), pg_logical_slot_get_changes_guts(), readOneRecord(), StartLogicalReplication(), SummarizeWAL(), XLogFindNextRecord(), XLogPrefetcherBeginRead(), and XlogReadTwoPhaseData().
|
extern |
Definition at line 1401 of file xlogreader.c.
References Assert, err(), fb(), InvalidXLogRecPtr, MAXALIGN, readLen, ReadPageInternal(), XLogBeginRead(), XLogPageHeaderSize, XLogReaderInvalReadState(), XLogReadRecord(), XLogRecPtrIsValid, XLP_FIRST_IS_CONTRECORD, XLogPageHeaderData::xlp_info, and XLogPageHeaderData::xlp_rem_len.
Referenced by InitXLogReaderState(), main(), and SummarizeWAL().
|
extern |
Definition at line 327 of file xlogreader.c.
References Assert, fb(), XLogRecPtrIsValid, and XLogReleasePreviousRecord().
Referenced by XLogPrefetcherReadRecord(), and XLogReadRecord().
|
extern |
Definition at line 978 of file xlogreader.c.
References Assert, fb(), result, XLogDecodeNextRecord(), and XLREAD_SUCCESS.
Referenced by XLogPrefetcherNextBlock(), and XLogReadRecord().
|
extern |
Definition at line 108 of file xlogreader.c.
References allocate_recordbuf(), fb(), MAX_ERRORMSG_LEN, MCXT_ALLOC_NO_OOM, MCXT_ALLOC_ZERO, palloc_extended(), pfree(), wal_segment_size, and WALOpenSegmentInit().
Referenced by extractPageMap(), findLastCheckpoint(), InitWalRecovery(), InitXLogReaderState(), main(), readOneRecord(), StartReplication(), StartupDecodingContext(), SummarizeWAL(), XLogInsertRecord(), and XlogReadTwoPhaseData().
|
extern |
Definition at line 163 of file xlogreader.c.
References pfree().
Referenced by extractPageMap(), findLastCheckpoint(), FreeDecodingContext(), GetWALRecordsInfo(), GetWalStats(), main(), pg_get_wal_block_info(), pg_get_wal_record_info(), readOneRecord(), ShutdownWalRecovery(), SummarizeWAL(), and XlogReadTwoPhaseData().
|
inlinestatic |
Definition at line 324 of file xlogreader.h.
References fb().
Referenced by XLogPrefetcherNextBlock(), XLogPrefetcherReadRecord(), and XLogReadRecord().
|
extern |
Definition at line 1377 of file xlogreader.c.
Referenced by XLogPageRead().
|
extern |
Definition at line 92 of file xlogreader.c.
Referenced by InitWalRecovery().
|
extern |
Definition at line 1236 of file xlogreader.c.
References Assert, fb(), LSN_FORMAT_ARGS, MAXFNAMELEN, report_invalid_record(), XLByteToSeg, XLOG_PAGE_MAGIC, XLogFileName(), XLogSegmentOffset, XLP_ALL_FLAGS, XLogPageHeaderData::xlp_info, XLP_LONG_HEADER, XLogPageHeaderData::xlp_magic, XLogPageHeaderData::xlp_pageaddr, and XLogPageHeaderData::xlp_tli.
Referenced by ReadPageInternal(), and XLogPageRead().
|
extern |
Definition at line 391 of file xlogreader.c.
References Assert, fb(), XLogNextRecord(), XLogReadAhead(), XLogReaderHasQueuedRecordOrError(), and XLogReleasePreviousRecord().
Referenced by decode_concurrent_changes(), DecodingContextFindStartpoint(), extractPageMap(), findLastCheckpoint(), LogicalReplicationSlotCheckPendingWal(), LogicalSlotAdvanceAndCheckSnapState(), main(), pg_logical_slot_get_changes_guts(), ReadNextXLogRecord(), readOneRecord(), SummarizeWAL(), XLogFindNextRecord(), XlogReadTwoPhaseData(), and XLogSendLogical().
|
extern |
Definition at line 2064 of file xlogreader.c.
References DecodedXLogRecord::blocks, DecodedBkpBlock::data_len, fb(), DecodedBkpBlock::in_use, len, DecodedXLogRecord::max_block_id, and XLogReaderState::record.
Referenced by _bt_restore_meta(), brin_xlog_insert_update(), brin_xlog_samepage_update(), btree_desc(), btree_xlog_dedup(), btree_xlog_delete(), btree_xlog_insert(), btree_xlog_newroot(), btree_xlog_split(), btree_xlog_vacuum(), DecodeInsert(), DecodeMultiInsert(), DecodeUpdate(), generic_redo(), gin_desc(), ginRedoInsert(), ginRedoInsertListPage(), ginRedoUpdateMetapage(), ginRedoVacuumDataLeafPage(), gistRedoPageSplitRecord(), gistRedoPageUpdateRecord(), hash_xlog_add_ovfl_page(), hash_xlog_delete(), hash_xlog_insert(), hash_xlog_move_page_contents(), hash_xlog_split_allocate_page(), hash_xlog_squeeze_page(), heap2_desc(), heap_xlog_inplace(), heap_xlog_insert(), heap_xlog_multi_insert(), heap_xlog_prune_freeze(), and heap_xlog_update().
|
extern |
Definition at line 2010 of file xlogreader.c.
References elog, ERROR, fb(), pg_fatal, and XLogRecGetBlockTagExtended().
Referenced by brin_xlog_revmap_extend(), btree_xlog_delete(), btree_xlog_split(), DecodeDelete(), DecodeInsert(), DecodeMultiInsert(), DecodeSpecConfirm(), DecodeUpdate(), gistRedoDeleteRecord(), gistRedoPageSplitRecord(), hash_xlog_add_ovfl_page(), hash_xlog_init_bitmap_page(), hash_xlog_init_meta_page(), hash_xlog_vacuum_one_page(), heap_xlog_delete(), heap_xlog_insert(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_multi_insert(), heap_xlog_prune_freeze(), heap_xlog_update(), spgRedoAddLeaf(), spgRedoAddNode(), spgRedoMoveLeafs(), spgRedoPickSplit(), and spgRedoVacuumRedirect().
|
extern |
Definition at line 2036 of file xlogreader.c.
References DecodedXLogRecord::blocks, fb(), XLogReaderState::record, and XLogRecHasBlockRef.
Referenced by btree_xlog_split(), change_useless_for_repack(), extractPageInfo(), GetWALBlockInfo(), heap_xlog_update(), SummarizeWAL(), verifyBackupPageConsistency(), xlog_block_info(), XLogReadBufferForRedoExtended(), XLogRecGetBlockRefInfo(), XLogRecGetBlockTag(), XLogRecordMatchesRelationBlock(), and XLogRecordSaveFPWs().
|
extern |
Definition at line 2206 of file xlogreader.c.
References AmStartupProcess, Assert, FullTransactionIdFromAllowableAt(), IsUnderPostmaster, TransamVariablesData::nextXid, TransamVariables, and XLogRecGetXid.
|
extern |
Definition at line 251 of file xlogreader.c.
References Assert, fb(), InvalidXLogRecPtr, DecodedXLogRecord::next, DecodedXLogRecord::next_lsn, DecodedXLogRecord::oversized, pfree(), and unlikely.
Referenced by XLogNextRecord(), XLogPrefetcherReadRecord(), and XLogReadRecord().