PostgreSQL Source Code git master
|
Go to the source code of this file.
Data Structures | |
struct | ReadLocalXLogPageNoWaitPrivate |
Macros | |
#define | InHotStandby (standbyState >= STANDBY_SNAPSHOT_PENDING) |
Typedefs | |
typedef struct ReadLocalXLogPageNoWaitPrivate | ReadLocalXLogPageNoWaitPrivate |
Enumerations | |
enum | HotStandbyState { STANDBY_DISABLED , STANDBY_INITIALIZED , STANDBY_SNAPSHOT_PENDING , STANDBY_SNAPSHOT_READY } |
enum | XLogRedoAction { BLK_NEEDS_REDO , BLK_DONE , BLK_RESTORED , BLK_NOTFOUND } |
Variables | |
PGDLLIMPORT bool | ignore_invalid_pages |
PGDLLIMPORT bool | InRecovery |
PGDLLIMPORT HotStandbyState | standbyState |
#define InHotStandby (standbyState >= STANDBY_SNAPSHOT_PENDING) |
Definition at line 60 of file xlogutils.h.
typedef struct ReadLocalXLogPageNoWaitPrivate ReadLocalXLogPageNoWaitPrivate |
enum HotStandbyState |
Enumerator | |
---|---|
STANDBY_DISABLED | |
STANDBY_INITIALIZED | |
STANDBY_SNAPSHOT_PENDING | |
STANDBY_SNAPSHOT_READY |
Definition at line 50 of file xlogutils.h.
enum XLogRedoAction |
Enumerator | |
---|---|
BLK_NEEDS_REDO | |
BLK_DONE | |
BLK_RESTORED | |
BLK_NOTFOUND |
Definition at line 72 of file xlogutils.h.
Relation CreateFakeRelcacheEntry | ( | RelFileLocator | rlocator | ) |
Definition at line 582 of file xlogutils.c.
References LockRelId::dbId, RelFileLocator::dbOid, INVALID_PROC_NUMBER, LockInfoData::lockRelId, palloc0(), FakeRelCacheEntryData::pgc, RelationData::rd_backend, RelationData::rd_locator, RelationData::rd_lockInfo, RelationData::rd_rel, RelationData::rd_smgr, RelationGetRelationName, LockRelId::relId, RelFileLocator::relNumber, smgropen(), and sprintf.
Referenced by heap_xlog_delete(), heap_xlog_insert(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_multi_insert(), heap_xlog_update(), heap_xlog_visible(), smgr_redo(), and smgrDoPendingSyncs().
void FreeFakeRelcacheEntry | ( | Relation | fakerel | ) |
Definition at line 629 of file xlogutils.c.
References pfree().
Referenced by heap_xlog_delete(), heap_xlog_insert(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_multi_insert(), heap_xlog_update(), heap_xlog_visible(), smgr_redo(), and smgrDoPendingSyncs().
int read_local_xlog_page | ( | XLogReaderState * | state, |
XLogRecPtr | targetPagePtr, | ||
int | reqLen, | ||
XLogRecPtr | targetRecPtr, | ||
char * | cur_page | ||
) |
Definition at line 861 of file xlogutils.c.
References read_local_xlog_page_guts().
Referenced by create_logical_replication_slot(), LogicalReplicationSlotHasPendingWal(), LogicalSlotAdvanceAndCheckSnapState(), pg_logical_slot_get_changes_guts(), and XlogReadTwoPhaseData().
int read_local_xlog_page_no_wait | ( | XLogReaderState * | state, |
XLogRecPtr | targetPagePtr, | ||
int | reqLen, | ||
XLogRecPtr | targetRecPtr, | ||
char * | cur_page | ||
) |
Definition at line 873 of file xlogutils.c.
References read_local_xlog_page_guts().
Referenced by InitXLogReaderState().
void wal_segment_close | ( | XLogReaderState * | state | ) |
Definition at line 842 of file xlogutils.c.
References close.
Referenced by create_logical_replication_slot(), CreateReplicationSlot(), InitWalRecovery(), InitXLogReaderState(), LogicalReplicationSlotHasPendingWal(), LogicalSlotAdvanceAndCheckSnapState(), pg_logical_slot_get_changes_guts(), StartLogicalReplication(), StartReplication(), SummarizeWAL(), WalSndErrorCleanup(), XlogReadTwoPhaseData(), and XLogSendPhysical().
void wal_segment_open | ( | XLogReaderState * | state, |
XLogSegNo | nextSegNo, | ||
TimeLineID * | tli_p | ||
) |
Definition at line 817 of file xlogutils.c.
References BasicOpenFile(), ereport, errcode_for_file_access(), errmsg(), ERROR, MAXPGPATH, PG_BINARY, and XLogFilePath().
Referenced by create_logical_replication_slot(), InitXLogReaderState(), LogicalReplicationSlotHasPendingWal(), LogicalSlotAdvanceAndCheckSnapState(), pg_logical_slot_get_changes_guts(), SummarizeWAL(), and XlogReadTwoPhaseData().
void WALReadRaiseError | ( | WALReadError * | errinfo | ) |
Definition at line 1020 of file xlogutils.c.
References ereport, errcode(), ERRCODE_DATA_CORRUPTED, errcode_for_file_access(), errmsg(), ERROR, MAXFNAMELEN, wal_segment_size, WALReadError::wre_errno, WALReadError::wre_off, WALReadError::wre_read, WALReadError::wre_req, WALReadError::wre_seg, WALOpenSegment::ws_segno, WALOpenSegment::ws_tli, and XLogFileName().
Referenced by logical_read_xlog_page(), read_local_xlog_page_guts(), summarizer_read_local_xlog_page(), and XLogSendPhysical().
void XLogCheckInvalidPages | ( | void | ) |
Definition at line 245 of file xlogutils.c.
References xl_invalid_page_key::blkno, elog, xl_invalid_page_key::forkno, hash_destroy(), hash_seq_init(), hash_seq_search(), ignore_invalid_pages, invalid_page_tab, xl_invalid_page::key, xl_invalid_page_key::locator, PANIC, xl_invalid_page::present, report_invalid_page(), and WARNING.
Referenced by CheckRecoveryConsistency().
void XLogDropDatabase | ( | Oid | dbid | ) |
Definition at line 652 of file xlogutils.c.
References forget_invalid_pages_db(), and smgrdestroyall().
Referenced by dbase_redo().
void XLogDropRelation | ( | RelFileLocator | rlocator, |
ForkNumber | forknum | ||
) |
Definition at line 641 of file xlogutils.c.
References forget_invalid_pages().
Referenced by DropRelationFiles().
bool XLogHaveInvalidPages | ( | void | ) |
Definition at line 235 of file xlogutils.c.
References hash_get_num_entries(), and invalid_page_tab.
Referenced by RecoveryRestartPoint().
Buffer XLogInitBufferForRedo | ( | XLogReaderState * | record, |
uint8 | block_id | ||
) |
Definition at line 326 of file xlogutils.c.
References buf, RBM_ZERO_AND_LOCK, and XLogReadBufferForRedoExtended().
Referenced by _bt_restore_meta(), brin_xlog_createidx(), brin_xlog_insert_update(), brin_xlog_revmap_extend(), btree_xlog_mark_page_halfdead(), btree_xlog_newroot(), btree_xlog_split(), btree_xlog_unlink_page(), ginRedoCreatePTree(), ginRedoDeleteListPages(), ginRedoInsertListPage(), ginRedoUpdateMetapage(), gistRedoPageSplitRecord(), hash_xlog_add_ovfl_page(), hash_xlog_init_bitmap_page(), hash_xlog_init_meta_page(), heap_xlog_insert(), heap_xlog_multi_insert(), heap_xlog_update(), seq_redo(), spgRedoAddLeaf(), spgRedoAddNode(), spgRedoMoveLeafs(), spgRedoPickSplit(), and spgRedoSplitTuple().
Buffer XLogReadBufferExtended | ( | RelFileLocator | rlocator, |
ForkNumber | forknum, | ||
BlockNumber | blkno, | ||
ReadBufferMode | mode, | ||
Buffer | recent_buffer | ||
) |
Definition at line 471 of file xlogutils.c.
References Assert, BMR_SMGR, BufferGetPage(), BufferIsValid(), EB_PERFORMING_RECOVERY, EB_SKIP_EXTENSION_LOCK, ExtendBufferedRelTo(), InRecovery, INVALID_PROC_NUMBER, InvalidBuffer, log_invalid_page(), mode, P_NEW, PageIsNew(), RBM_NORMAL, RBM_NORMAL_NO_LOG, ReadBufferWithoutRelcache(), ReadRecentBuffer(), ReleaseBuffer(), smgrcreate(), smgrnblocks(), and smgropen().
Referenced by verifyBackupPageConsistency(), XLogReadBufferForRedoExtended(), and XLogRecordPageWithFreeSpace().
XLogRedoAction XLogReadBufferForRedo | ( | XLogReaderState * | record, |
uint8 | block_id, | ||
Buffer * | buf | ||
) |
Definition at line 314 of file xlogutils.c.
References buf, RBM_NORMAL, and XLogReadBufferForRedoExtended().
Referenced by _bt_clear_incomplete_split(), brin_xlog_desummarize_page(), brin_xlog_insert_update(), brin_xlog_revmap_extend(), brin_xlog_samepage_update(), brin_xlog_update(), btree_xlog_dedup(), btree_xlog_delete(), btree_xlog_insert(), btree_xlog_mark_page_halfdead(), btree_xlog_split(), btree_xlog_unlink_page(), generic_redo(), ginRedoClearIncompleteSplit(), ginRedoDeletePage(), ginRedoInsert(), ginRedoSplit(), ginRedoUpdateMetapage(), ginRedoVacuumDataLeafPage(), ginRedoVacuumPage(), gistRedoClearFollowRight(), gistRedoDeleteRecord(), gistRedoPageDelete(), gistRedoPageUpdateRecord(), hash_xlog_add_ovfl_page(), hash_xlog_delete(), hash_xlog_init_bitmap_page(), hash_xlog_insert(), hash_xlog_move_page_contents(), hash_xlog_split_allocate_page(), hash_xlog_split_cleanup(), hash_xlog_split_complete(), hash_xlog_split_page(), hash_xlog_squeeze_page(), hash_xlog_update_meta_page(), hash_xlog_vacuum_one_page(), heap_xlog_confirm(), heap_xlog_delete(), heap_xlog_inplace(), heap_xlog_insert(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_multi_insert(), heap_xlog_update(), heap_xlog_visible(), spgRedoAddLeaf(), spgRedoAddNode(), spgRedoMoveLeafs(), spgRedoPickSplit(), spgRedoSplitTuple(), spgRedoVacuumLeaf(), spgRedoVacuumRedirect(), spgRedoVacuumRoot(), and xlog_redo().
XLogRedoAction XLogReadBufferForRedoExtended | ( | XLogReaderState * | record, |
uint8 | block_id, | ||
ReadBufferMode | mode, | ||
bool | get_cleanup_lock, | ||
Buffer * | buf | ||
) |
Definition at line 351 of file xlogutils.c.
References Assert, BKPBLOCK_WILL_INIT, BLK_DONE, BLK_NEEDS_REDO, BLK_NOTFOUND, BLK_RESTORED, buf, BUFFER_LOCK_EXCLUSIVE, BufferGetPage(), BufferIsValid(), elog, XLogReaderState::EndRecPtr, ereport, errcode(), errmsg_internal(), ERROR, XLogReaderState::errormsg_buf, FlushOneBuffer(), INIT_FORKNUM, LockBuffer(), LockBufferForCleanup(), MarkBufferDirty(), mode, PageGetLSN(), PageIsNew(), PageSetLSN(), PANIC, RBM_ZERO_AND_CLEANUP_LOCK, RBM_ZERO_AND_LOCK, RestoreBlockImage(), XLogReadBufferExtended(), XLogRecBlockImageApply, XLogRecGetBlock, XLogRecGetBlockTagExtended(), and XLogRecHasBlockImage.
Referenced by btree_xlog_vacuum(), hash_xlog_delete(), hash_xlog_move_page_contents(), hash_xlog_split_allocate_page(), hash_xlog_squeeze_page(), hash_xlog_vacuum_one_page(), heap_xlog_prune_freeze(), heap_xlog_visible(), XLogInitBufferForRedo(), and XLogReadBufferForRedo().
void XLogReadDetermineTimeline | ( | XLogReaderState * | state, |
XLogRecPtr | wantPage, | ||
uint32 | wantLength, | ||
TimeLineID | currTLI | ||
) |
Definition at line 718 of file xlogutils.c.
References Assert, DEBUG3, elog, InvalidXLogRecPtr, list_free_deep(), LSN_FORMAT_ARGS, Min, readTimeLineHistory(), tliOfPointInHistory(), and tliSwitchPoint().
Referenced by logical_read_xlog_page(), and read_local_xlog_page_guts().
void XLogTruncateRelation | ( | RelFileLocator | rlocator, |
ForkNumber | forkNum, | ||
BlockNumber | nblocks | ||
) |
Definition at line 671 of file xlogutils.c.
References forget_invalid_pages().
Referenced by smgr_redo().
|
extern |
Definition at line 34 of file xlogutils.c.
Referenced by log_invalid_page(), and XLogCheckInvalidPages().
|
extern |
Definition at line 50 of file xlogutils.c.
Referenced by _mdfd_getseg(), CheckRecoveryConflictDeadlock(), create_tablespace_directories(), ExtendCommitTs(), FinishWalRecovery(), FreeSpaceMapPrepareTruncateRel(), GetXLogReceiptTime(), InitWalRecovery(), LockAcquireExtended(), mdexists(), mdprefetch(), mdreadv(), mdtruncate(), MultiXactAdvanceOldest(), ProcSleep(), SetMultiXactIdLimit(), SetTransactionIdLimit(), SlruPhysicalReadPage(), smgrnblocks_cached(), StartupXLOG(), TransactionIdSetStatusBit(), UpdateMinRecoveryPoint(), visibilitymap_prepare_truncate(), visibilitymap_set(), xlog_redo(), XLogNeedsFlush(), and XLogReadBufferExtended().
|
extern |
Definition at line 53 of file xlogutils.c.
Referenced by ApplyWalRecord(), CheckRecoveryConsistency(), ExpireTreeKnownAssignedTransactionIds(), InitRecoveryTransactionEnvironment(), ProcArrayApplyRecoveryInfo(), ProcArrayApplyXidAssignment(), ProcArrayInitRecovery(), RecordKnownAssignedTransactionIds(), standby_redo(), StartupProcExit(), StartupXLOG(), xact_redo(), xact_redo_abort(), xact_redo_commit(), and xlog_redo().