|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <ctype.h>#include <time.h>#include <sys/stat.h>#include <unistd.h>#include "access/timeline.h"#include "access/transam.h"#include "access/xact.h"#include "access/xlog_internal.h"#include "access/xlogarchive.h"#include "access/xlogprefetcher.h"#include "access/xlogreader.h"#include "access/xlogrecovery.h"#include "access/xlogutils.h"#include "access/xlogwait.h"#include "backup/basebackup.h"#include "catalog/pg_control.h"#include "commands/tablespace.h"#include "common/file_utils.h"#include "miscadmin.h"#include "nodes/miscnodes.h"#include "pgstat.h"#include "postmaster/bgwriter.h"#include "postmaster/startup.h"#include "replication/slot.h"#include "replication/slotsync.h"#include "replication/walreceiver.h"#include "storage/fd.h"#include "storage/ipc.h"#include "storage/latch.h"#include "storage/pmsignal.h"#include "storage/procarray.h"#include "storage/spin.h"#include "storage/subsystems.h"#include "utils/datetime.h"#include "utils/fmgrprotos.h"#include "utils/guc_hooks.h"#include "utils/pgstat_internal.h"#include "utils/pg_lsn.h"#include "utils/ps_status.h"#include "utils/pg_rusage.h"#include "utils/wait_event.h"
Go to the source code of this file.
Data Structures | |
| struct | XLogPageReadPrivate |
Macros | |
| #define | RECOVERY_COMMAND_FILE "recovery.conf" |
| #define | RECOVERY_COMMAND_DONE "recovery.done" |
Typedefs | |
| typedef struct XLogPageReadPrivate | XLogPageReadPrivate |
Enumerations | |
| enum | XLogSource { XLOG_FROM_ANY = 0 , XLOG_FROM_ARCHIVE , XLOG_FROM_PG_WAL , XLOG_FROM_STREAM } |
| #define RECOVERY_COMMAND_DONE "recovery.done" |
Definition at line 73 of file xlogrecovery.c.
| #define RECOVERY_COMMAND_FILE "recovery.conf" |
Definition at line 72 of file xlogrecovery.c.
| Enumerator | |
|---|---|
| XLOG_FROM_ANY | |
| XLOG_FROM_ARCHIVE | |
| XLOG_FROM_PG_WAL | |
| XLOG_FROM_STREAM | |
Definition at line 213 of file xlogrecovery.c.
|
static |
Definition at line 1880 of file xlogrecovery.c.
References AdvanceNextFullTransactionIdPastXid(), AllowCascadeReplication, ErrorContextCallback::arg, ErrorContextCallback::callback, CheckRecoveryConsistency(), checkTimeLineSwitch(), doRequestWalReceiverReply, XLogReaderState::EndRecPtr, error_context_stack, fb(), GetRmgr(), XLogRecoveryCtlData::info_lck, XLogRecoveryCtlData::lastReplayedEndRecPtr, XLogRecoveryCtlData::lastReplayedReadRecPtr, XLogRecoveryCtlData::lastReplayedTLI, memcpy(), ErrorContextCallback::previous, CheckPoint::PrevTimeLineID, XLogReaderState::ReadRecPtr, RecordKnownAssignedTransactionIds(), RemoveNonParentXlogFiles(), XLogRecoveryCtlData::replayEndRecPtr, XLogRecoveryCtlData::replayEndTLI, RmgrData::rm_redo, rm_redo_error_callback(), SpinLockAcquire(), SpinLockRelease(), STANDBY_INITIALIZED, standbyState, CheckPoint::ThisTimeLineID, TransactionIdIsValid, verifyBackupPageConsistency(), WalRcvRequestApplyReply(), WalSndWakeup(), XLogRecord::xl_info, XLogRecord::xl_rmid, XLogRecord::xl_xid, XLOG_CHECKPOINT_SHUTDOWN, XLOG_END_OF_RECOVERY, XLogPrefetchReconfigure(), xlogreader, XLogRecGetData, xlogrecovery_redo(), XLogRecoveryCtl, and XLR_CHECK_CONSISTENCY.
Referenced by PerformWalRecovery().
Definition at line 4811 of file xlogrecovery.c.
References error_multiple_recovery_targets(), fb(), newval, RECOVERY_TARGET_IMMEDIATE, RECOVERY_TARGET_UNSET, and recoveryTarget.
Definition at line 4852 of file xlogrecovery.c.
References error_multiple_recovery_targets(), fb(), newval, RECOVERY_TARGET_LSN, RECOVERY_TARGET_UNSET, recoveryTarget, and recoveryTargetLSN.
Definition at line 4887 of file xlogrecovery.c.
References error_multiple_recovery_targets(), fb(), newval, RECOVERY_TARGET_NAME, RECOVERY_TARGET_UNSET, recoveryTarget, and recoveryTargetName.
Definition at line 4967 of file xlogrecovery.c.
References error_multiple_recovery_targets(), fb(), newval, RECOVERY_TARGET_TIME, RECOVERY_TARGET_UNSET, and recoveryTarget.
Definition at line 5030 of file xlogrecovery.c.
References fb(), newval, RECOVERY_TARGET_TIMELINE_NUMERIC, recoveryTargetTimeLineGoal, and recoveryTargetTLIRequested.
Definition at line 5095 of file xlogrecovery.c.
References error_multiple_recovery_targets(), fb(), newval, RECOVERY_TARGET_UNSET, RECOVERY_TARGET_XID, recoveryTarget, and recoveryTargetXid.
Definition at line 4746 of file xlogrecovery.c.
References fb(), GUC_check_errcode(), GUC_check_errdetail, GUC_check_errhint, newval, and ReplicationSlotValidateNameInternal().
Definition at line 4797 of file xlogrecovery.c.
References fb(), GUC_check_errdetail, and newval.
Definition at line 4827 of file xlogrecovery.c.
References ErrorSaveContext::error_occurred, fb(), guc_malloc(), LOG, newval, and pg_lsn_in_safe().
Definition at line 4871 of file xlogrecovery.c.
References fb(), GUC_check_errdetail, MAXFNAMELEN, and newval.
Definition at line 4912 of file xlogrecovery.c.
References DecodeDateTime(), DTK_DATE, fb(), GUC_check_errdetail, MAXDATEFIELDS, MAXDATELEN, newval, ParseDateTime(), str, tm, and tm2timestamp().
Definition at line 4983 of file xlogrecovery.c.
References fb(), GUC_check_errdetail, guc_malloc(), LOG, newval, PG_UINT32_MAX, RECOVERY_TARGET_TIMELINE_CONTROLFILE, RECOVERY_TARGET_TIMELINE_LATEST, and RECOVERY_TARGET_TIMELINE_NUMERIC.
Definition at line 5043 of file xlogrecovery.c.
References fb(), FirstNormalTransactionId, GUC_check_errdetail, guc_malloc(), LOG, newval, and val.
Definition at line 4439 of file xlogrecovery.c.
References CheckPromoteSignal(), ereport, errmsg, IsPromoteSignaled(), LocalPromoteIsTriggered, LOG, RemovePromoteSignalFiles(), ResetPromoteSignaled(), and SetPromoteIsTriggered().
Referenced by ReadRecord(), recoveryApplyDelay(), recoveryPausesHere(), RecoveryRequiresIntParameter(), and WaitForWALToBecomeAvailable().
Definition at line 4469 of file xlogrecovery.c.
References fb(), PROMOTE_SIGNAL_FILE, and stat.
Referenced by CheckForStandbyTrigger(), and process_pm_pmsignal().
Definition at line 2148 of file xlogrecovery.c.
References Assert, backupEndPoint, backupEndRequired, backupStartPoint, CheckTablespaceDirectory(), DEBUG1, elog, ereport, errmsg, fb(), InArchiveRecovery, XLogRecoveryCtlData::info_lck, InvalidXLogRecPtr, IsUnderPostmaster, XLogRecoveryCtlData::lastReplayedEndRecPtr, XLogRecoveryCtlData::lastReplayedTLI, LocalHotStandbyActive, LOG, LSN_FORMAT_ARGS, minRecoveryPoint, PMSIGNAL_BEGIN_HOT_STANDBY, PMSIGNAL_RECOVERY_CONSISTENT, reachedConsistency, ReachedEndOfBackup(), SendPostmasterSignal(), XLogRecoveryCtlData::SharedHotStandbyActive, SpinLockAcquire(), SpinLockRelease(), STANDBY_SNAPSHOT_READY, standbyState, XLogCheckInvalidPages(), XLogRecoveryCtl, and XLogRecPtrIsValid.
Referenced by ApplyWalRecord(), PerformWalRecovery(), and ReadRecord().
Definition at line 2115 of file xlogrecovery.c.
References AllocateDir(), allow_in_place_tablespaces, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errdetail(), errhint(), errmsg, ERROR, fb(), get_dirent_type(), MAXPGPATH, PANIC, PG_TBLSPC_DIR, PGFILETYPE_LNK, ReadDir(), snprintf, and WARNING.
Referenced by CheckRecoveryConsistency().
|
static |
Definition at line 2351 of file xlogrecovery.c.
References ereport, errmsg, expectedTLEs, fb(), LSN_FORMAT_ARGS, minRecoveryPoint, minRecoveryPointTLI, PANIC, tliInHistory(), and XLogRecPtrIsValid.
Referenced by ApplyWalRecord().
Definition at line 3084 of file xlogrecovery.c.
References XLogRecoveryCtlData::info_lck, RECOVERY_PAUSE_REQUESTED, RECOVERY_PAUSED, XLogRecoveryCtlData::recoveryPauseState, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by recoveryPausesHere(), and RecoveryRequiresIntParameter().
|
static |
Definition at line 4038 of file xlogrecovery.c.
References DEBUG1, fb(), InvalidXLogRecPtr, LOG, readSource, and XLOG_FROM_PG_WAL.
Referenced by ReadRecord(), and XLogPageRead().
Definition at line 423 of file xlogrecovery.c.
References disable_startup_progress_timeout(), and StandbyMode.
Referenced by InitWalRecovery(), and ReadRecord().
|
static |
Definition at line 4785 of file xlogrecovery.c.
References ereport, errcode(), errdetail(), errmsg, ERROR, and fb().
Referenced by assign_recovery_target(), assign_recovery_target_lsn(), assign_recovery_target_name(), assign_recovery_target_time(), and assign_recovery_target_xid().
| EndOfWalRecoveryInfo * FinishWalRecovery | ( | void | ) |
Definition at line 1417 of file xlogrecovery.c.
References abortedRecPtr, ArchiveRecoveryRequested, Assert, CheckPointLoc, CheckPointTLI, close, XLogReaderState::EndRecPtr, fb(), getRecoveryStopReason(), InArchiveRecovery, InRecovery, XLogRecoveryCtlData::lastReplayedReadRecPtr, XLogRecoveryCtlData::lastReplayedTLI, len, memcpy(), missingContrecPtr, palloc(), palloc_object, PANIC, XLogReaderState::readBuf, readFile, readOff, ReadRecord(), recovery_signal_file_found, result, XLogReaderState::seg, ShutDownSlotSync(), standby_signal_file_found, StandbyMode, wal_segment_size, WalRcvStreaming(), WALOpenSegment::ws_tli, xlogprefetcher, XLogPrefetcherBeginRead(), xlogreader, XLogRecoveryCtl, XLogSegmentOffset, and XLogShutdownWalRcv().
Referenced by StartupXLOG().
| TimestampTz GetCurrentChunkReplayStartTime | ( | void | ) |
Definition at line 4632 of file xlogrecovery.c.
References XLogRecoveryCtlData::currentChunkStartTime, fb(), XLogRecoveryCtlData::info_lck, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by GetReplicationApplyDelay().
| XLogRecPtr GetCurrentReplayRecPtr | ( | TimeLineID * | replayEndTLI | ) |
Definition at line 4568 of file xlogrecovery.c.
References fb(), XLogRecoveryCtlData::info_lck, XLogRecoveryCtlData::replayEndRecPtr, XLogRecoveryCtlData::replayEndTLI, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by UpdateMinRecoveryPoint(), and xlog_redo().
| TimestampTz GetLatestXTime | ( | void | ) |
Definition at line 4602 of file xlogrecovery.c.
References fb(), XLogRecoveryCtlData::info_lck, XLogRecoveryCtlData::recoveryLastXTime, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by CreateRestartPoint(), PerformWalRecovery(), and pg_last_xact_replay_timestamp().
|
static |
Definition at line 2400 of file xlogrecovery.c.
References fb(), XLOG_RESTORE_POINT, XLOG_XACT_ABORT, XLOG_XACT_ABORT_PREPARED, XLOG_XACT_COMMIT, XLOG_XACT_COMMIT_PREPARED, XLOG_XACT_OPMASK, XLogRecGetData, XLogRecGetInfo, and XLogRecGetRmid.
Referenced by recoveryApplyDelay(), recoveryStopsAfter(), and recoveryStopsBefore().
| RecoveryPauseState GetRecoveryPauseState | ( | void | ) |
Definition at line 3044 of file xlogrecovery.c.
References XLogRecoveryCtlData::info_lck, XLogRecoveryCtlData::recoveryPauseState, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by pg_get_wal_replay_pause_state(), pg_is_wal_replay_paused(), recoveryPausesHere(), and RecoveryRequiresIntParameter().
Definition at line 2860 of file xlogrecovery.c.
References LSN_FORMAT_ARGS, pstrdup(), RECOVERY_TARGET_IMMEDIATE, RECOVERY_TARGET_LSN, RECOVERY_TARGET_NAME, RECOVERY_TARGET_TIME, RECOVERY_TARGET_XID, recoveryStopAfter, recoveryStopLSN, recoveryStopName, recoveryStopTime, recoveryStopXid, recoveryTarget, snprintf, and timestamptz_to_str().
Referenced by FinishWalRecovery().
| void GetXLogReceiptTime | ( | TimestampTz * | rtime, |
| bool * | fromStream | ||
| ) |
Definition at line 4648 of file xlogrecovery.c.
References Assert, fb(), InRecovery, XLOG_FROM_STREAM, XLogReceiptSource, and XLogReceiptTime.
Referenced by GetStandbyLimitTime().
| XLogRecPtr GetXLogReplayRecPtr | ( | TimeLineID * | replayTLI | ) |
Definition at line 4545 of file xlogrecovery.c.
References fb(), XLogRecoveryCtlData::info_lck, XLogRecoveryCtlData::lastReplayedEndRecPtr, XLogRecoveryCtlData::lastReplayedTLI, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by CheckpointerMain(), CreateRestartPoint(), GetCurrentLSN(), GetCurrentLSNForWaitType(), GetLatestLSN(), GetReplicationApplyDelay(), GetStandbyFlushRecPtr(), IsCheckpointOnSchedule(), logical_read_xlog_page(), pg_last_wal_replay_lsn(), pg_logical_slot_get_changes_guts(), pg_replication_slot_advance(), read_local_xlog_page_guts(), ReadReplicationSlot(), ReplicationSlotReserveWal(), WalReceiverMain(), WalSndWaitForWal(), XLogSendLogical(), and XLogWalRcvSendReply().
Definition at line 4508 of file xlogrecovery.c.
References XLogRecoveryCtlData::info_lck, LocalHotStandbyActive, XLogRecoveryCtlData::SharedHotStandbyActive, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by XLogWalRcvSendHSFeedback().
Definition at line 4533 of file xlogrecovery.c.
References AmStartupProcess, Assert, IsPostmasterEnvironment, and LocalHotStandbyActive.
Referenced by RecoveryRequiresIntParameter().
| void InitWalRecovery | ( | ControlFileData * | ControlFile, |
| bool * | wasShutdown_ptr, | ||
| bool * | haveBackupLabel_ptr, | ||
| bool * | haveTblspcMap_ptr | ||
| ) |
Definition at line 457 of file xlogrecovery.c.
References abortedRecPtr, ArchiveRecoveryRequested, Assert, BACKUP_LABEL_FILE, backupEndPoint, ControlFileData::backupEndPoint, backupEndRequired, ControlFileData::backupEndRequired, backupStartPoint, ControlFileData::backupStartPoint, ControlFileData::checkPoint, ControlFileData::checkPointCopy, CheckPointLoc, CheckPointTLI, ControlFile, DataDir, DB_IN_ARCHIVE_RECOVERY, DB_IN_CRASH_RECOVERY, DB_SHUTDOWNED, DB_SHUTDOWNED_IN_RECOVERY, DEBUG1, durable_rename(), EnableStandbyMode(), ereport, errcode(), errcode_for_file_access(), errdetail(), errhint(), errmsg, errmsg_internal(), ERROR, expectedTLEs, FATAL, fb(), InArchiveRecovery, InRecovery, InvalidXLogRecPtr, lfirst, LOG, LSN_FORMAT_ARGS, memcpy(), minRecoveryPoint, ControlFileData::minRecoveryPoint, minRecoveryPointTLI, ControlFileData::minRecoveryPointTLI, missingContrecPtr, CheckPoint::newestCommitTsXid, CheckPoint::nextMulti, CheckPoint::nextMultiOffset, CheckPoint::nextOid, CheckPoint::nextXid, NIL, CheckPoint::oldestCommitTsXid, CheckPoint::oldestMulti, CheckPoint::oldestMultiDB, CheckPoint::oldestXid, CheckPoint::oldestXidDB, OwnLatch(), palloc(), palloc0_object, PANIC, pfree(), PG_TBLSPC_DIR, primary_image_masked, psprintf(), read_backup_label(), read_tablespace_map(), ReadCheckpointRecord(), ReadRecord(), readRecoverySignalFile(), RECOVERY_TARGET_IMMEDIATE, RECOVERY_TARGET_LSN, RECOVERY_TARGET_NAME, RECOVERY_TARGET_TIME, RECOVERY_TARGET_XID, recoveryTarget, recoveryTargetLSN, recoveryTargetName, recoveryTargetTime, recoveryTargetTLI, recoveryTargetXid, XLogRecoveryCtlData::recoveryWakeupLatch, CheckPoint::redo, RedoStartLSN, RedoStartTLI, remove_tablespace_symlink(), replay_image_masked, StandbyModeRequested, stat, ControlFileData::state, symlink, XLogReaderState::system_identifier, ControlFileData::system_identifier, TABLESPACE_MAP, TABLESPACE_MAP_OLD, CheckPoint::ThisTimeLineID, timestamptz_to_str(), tliOfPointInHistory(), tliSwitchPoint(), TransactionIdIsNormal, U64FromFullTransactionId, UINT64_FORMAT, validateRecoveryParameters(), wal_decode_buffer_size, wal_segment_close(), wal_segment_size, XidFromFullTransactionId, XLogRecord::xl_info, XL_ROUTINE, XLOG_CHECKPOINT_SHUTDOWN, XLogPageRead(), xlogprefetcher, XLogPrefetcherAllocate(), XLogPrefetcherBeginRead(), xlogreader, XLogReaderAllocate(), XLogReaderSetDecodeBuffer(), XLogRecGetData, XLogRecoveryCtl, and XLogRecPtrIsValid.
Referenced by StartupXLOG().
Definition at line 1612 of file xlogrecovery.c.
References appendStringInfo(), appendStringInfoString(), ApplyWalRecord(), ArchiveRecoveryRequested, Assert, begin_startup_progress_phase(), buf, CheckPointLoc, CheckPointTLI, CheckRecoveryConsistency(), XLogRecoveryCtlData::currentChunkStartTime, elog, XLogReaderState::EndRecPtr, ereport, ereport_startup_progress, errcode(), errmsg, FATAL, fb(), GetCurrentTimestamp(), GetLatestXTime(), XLogRecoveryCtlData::info_lck, initStringInfo(), InRedo, InvalidXLogRecPtr, IsUnderPostmaster, XLogRecoveryCtlData::lastReplayedEndRecPtr, XLogRecoveryCtlData::lastReplayedReadRecPtr, XLogRecoveryCtlData::lastReplayedTLI, LOG, LSN_FORMAT_ARGS, WaitLSNState::minWaitedLSN, PANIC, pfree(), pg_atomic_read_u64(), pg_fallthrough, pg_rusage_init(), pg_rusage_show(), PMSIGNAL_RECOVERY_STARTED, proc_exit(), ProcessStartupProcInterrupts(), reachedConsistency, ReadRecord(), XLogReaderState::ReadRecPtr, RECOVERY_NOT_PAUSED, RECOVERY_TARGET_ACTION_PAUSE, RECOVERY_TARGET_ACTION_PROMOTE, RECOVERY_TARGET_ACTION_SHUTDOWN, RECOVERY_TARGET_UNSET, recoveryApplyDelay(), XLogRecoveryCtlData::recoveryLastXTime, recoveryPausesHere(), XLogRecoveryCtlData::recoveryPauseState, recoveryStopsAfter(), recoveryStopsBefore(), recoveryTarget, recoveryTargetAction, RedoStartLSN, RedoStartTLI, XLogRecoveryCtlData::replayEndRecPtr, XLogRecoveryCtlData::replayEndTLI, RmgrCleanup(), RmgrStartup(), SendPostmasterSignal(), SetRecoveryPause(), SpinLockAcquire(), SpinLockRelease(), StandbyMode, timestamptz_to_str(), WAIT_LSN_TYPE_STANDBY_REPLAY, waitLSNState, WaitLSNWakeup(), XLogRecord::xl_info, XLogRecord::xl_rmid, XLOG_CHECKPOINT_REDO, xlog_outdesc(), xlogprefetcher, XLogPrefetcherBeginRead(), xlogreader, XLogReceiptTime, XLogRecoveryCtl, and XLR_INFO_MASK.
Referenced by StartupXLOG().
Definition at line 4400 of file xlogrecovery.c.
References XLogRecoveryCtlData::info_lck, LocalPromoteIsTriggered, XLogRecoveryCtlData::SharedPromoteIsTriggered, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by ExecWaitStmt(), PerformRecoveryXLogAction(), pg_wal_replay_pause(), pg_wal_replay_resume(), and WaitForLSN().
|
static |
Definition at line 1167 of file xlogrecovery.c.
References AllocateFile(), BACKUP_LABEL_FILE, backupEndRequired, DEBUG1, ereport, errcode(), errcode_for_file_access(), errdetail(), errhint(), errmsg, errmsg_internal(), FATAL, fb(), FreeFile(), InvalidXLogRecPtr, MAXFNAMELEN, MAXPGPATH, RedoStartLSN, and RedoStartTLI.
Referenced by InitWalRecovery().
Definition at line 1313 of file xlogrecovery.c.
References AllocateFile(), ereport, errcode(), errcode_for_file_access(), errmsg, FATAL, fb(), FreeFile(), i, lappend(), MAXPGPATH, palloc0_object, pstrdup(), str, and TABLESPACE_MAP.
Referenced by InitWalRecovery().
|
static |
Definition at line 4057 of file xlogrecovery.c.
References Assert, ereport, errmsg, fb(), LOG, ReadRecord(), SizeOfXLogRecord, SizeOfXLogRecordDataHeaderShort, XLogRecord::xl_info, XLogRecord::xl_rmid, XLogRecord::xl_tot_len, XLOG_CHECKPOINT_ONLINE, XLOG_CHECKPOINT_SHUTDOWN, xlogprefetcher, XLogPrefetcherBeginRead(), xlogreader, and XRecOffIsValid.
Referenced by InitWalRecovery().
|
static |
Definition at line 3105 of file xlogrecovery.c.
References abortedRecPtr, XLogReaderState::abortedRecPtr, AmStartupProcess, ArchiveRecoveryRequested, Assert, CheckForStandbyTrigger(), CheckRecoveryConsistency(), close, currentSource, DEBUG1, emode_for_corrupt_record(), EnableStandbyMode(), XLogReaderState::EndRecPtr, ereport, errmsg, errmsg_internal(), expectedTLEs, fb(), InArchiveRecovery, IsUnderPostmaster, lastSourceFailed, XLogReaderState::latestPagePtr, XLogReaderState::latestPageTLI, LSN_FORMAT_ARGS, MAXFNAMELEN, minRecoveryPoint, minRecoveryPointTLI, missingContrecPtr, XLogReaderState::missingContrecPtr, XLogReaderState::private_data, readFile, XLogReaderState::ReadRecPtr, XLogReaderState::seg, StandbyMode, StandbyModeRequested, SwitchIntoArchiveRecovery(), tliInHistory(), wal_segment_size, WALOpenSegment::ws_tli, XLByteToSeg, XLOG_FROM_ANY, XLogFileName(), xlogprefetcher, XLogPrefetcherGetReader(), XLogPrefetcherReadRecord(), xlogreader, XLogRecPtrIsValid, and XLogSegmentOffset.
Referenced by FinishWalRecovery(), InitWalRecovery(), PerformWalRecovery(), and ReadCheckpointRecord().
Definition at line 984 of file xlogrecovery.c.
References ArchiveRecoveryRequested, BasicOpenFilePerm(), close, ereport, errcode(), errcode_for_file_access(), errmsg, FATAL, fb(), fd(), IsBootstrapProcessingMode, IsUnderPostmaster, PG_BINARY, pg_fsync(), RECOVERY_COMMAND_DONE, RECOVERY_COMMAND_FILE, RECOVERY_SIGNAL_FILE, recovery_signal_file_found, S_IRUSR, S_IWUSR, STANDBY_SIGNAL_FILE, standby_signal_file_found, StandbyModeRequested, and stat.
Referenced by InitWalRecovery().
|
static |
Definition at line 2956 of file xlogrecovery.c.
References ArchiveRecoveryRequested, CheckForStandbyTrigger(), DEBUG2, elog, fb(), GetCurrentTimestamp(), getRecordTimestamp(), ProcessStartupProcInterrupts(), reachedConsistency, recovery_min_apply_delay, XLogRecoveryCtlData::recoveryWakeupLatch, ResetLatch(), TimestampDifferenceMilliseconds(), TimestampTzPlusMilliseconds, WaitLatch(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_TIMEOUT, XLOG_XACT_COMMIT, XLOG_XACT_COMMIT_PREPARED, XLOG_XACT_OPMASK, XLogRecGetInfo, XLogRecGetRmid, and XLogRecoveryCtl.
Referenced by PerformWalRecovery().
Definition at line 2899 of file xlogrecovery.c.
References CheckForStandbyTrigger(), ConditionVariableCancelSleep(), ConditionVariableTimedSleep(), ConfirmRecoveryPaused(), ereport, errhint(), errmsg, fb(), GetRecoveryPauseState(), LocalHotStandbyActive, LocalPromoteIsTriggered, LOG, ProcessStartupProcInterrupts(), RECOVERY_NOT_PAUSED, XLogRecoveryCtlData::recoveryNotPausedCV, and XLogRecoveryCtl.
Referenced by PerformWalRecovery(), and WaitForWALToBecomeAvailable().
Definition at line 4665 of file xlogrecovery.c.
References CheckForStandbyTrigger(), ConditionVariableCancelSleep(), ConditionVariableTimedSleep(), ConfirmRecoveryPaused(), ereport, errcode(), errdetail(), errhint(), errmsg, FATAL, fb(), GetRecoveryPauseState(), HotStandbyActiveInReplay(), LOG, ProcessStartupProcInterrupts(), RECOVERY_NOT_PAUSED, XLogRecoveryCtlData::recoveryNotPausedCV, SetRecoveryPause(), WARNING, and XLogRecoveryCtl.
Referenced by CheckRequiredParameterValues().
|
static |
Definition at line 2700 of file xlogrecovery.c.
References ArchiveRecoveryRequested, ereport, errmsg, fb(), getRecordTimestamp(), InvalidTransactionId, InvalidXLogRecPtr, LOG, LSN_FORMAT_ARGS, MAXFNAMELEN, ParseAbortRecord(), ParseCommitRecord(), reachedConsistency, XLogReaderState::ReadRecPtr, RECOVERY_TARGET_IMMEDIATE, RECOVERY_TARGET_LSN, RECOVERY_TARGET_NAME, RECOVERY_TARGET_XID, recoveryStopAfter, recoveryStopLSN, recoveryStopName, recoveryStopTime, recoveryStopXid, recoveryTarget, recoveryTargetInclusive, recoveryTargetLSN, recoveryTargetName, recoveryTargetXid, SetLatestXTime(), strlcpy(), timestamptz_to_str(), XLOG_RESTORE_POINT, XLOG_XACT_ABORT, XLOG_XACT_ABORT_PREPARED, XLOG_XACT_COMMIT, XLOG_XACT_COMMIT_PREPARED, XLOG_XACT_OPMASK, XLogRecGetData, XLogRecGetInfo, XLogRecGetRmid, and XLogRecGetXid.
Referenced by PerformWalRecovery().
|
static |
Definition at line 2547 of file xlogrecovery.c.
References ArchiveRecoveryRequested, ereport, errmsg, fb(), getRecordTimestamp(), InvalidTransactionId, InvalidXLogRecPtr, LOG, LSN_FORMAT_ARGS, ParseAbortRecord(), ParseCommitRecord(), reachedConsistency, XLogReaderState::ReadRecPtr, RECOVERY_TARGET_IMMEDIATE, RECOVERY_TARGET_LSN, RECOVERY_TARGET_TIME, RECOVERY_TARGET_XID, recoveryStopAfter, recoveryStopLSN, recoveryStopName, recoveryStopTime, recoveryStopXid, recoveryTarget, recoveryTargetInclusive, recoveryTargetLSN, recoveryTargetTime, recoveryTargetXid, timestamptz_to_str(), XLOG_XACT_ABORT, XLOG_XACT_ABORT_PREPARED, XLOG_XACT_COMMIT, XLOG_XACT_COMMIT_PREPARED, XLOG_XACT_OPMASK, XLogRecGetData, XLogRecGetInfo, XLogRecGetRmid, and XLogRecGetXid.
Referenced by PerformWalRecovery().
Definition at line 4460 of file xlogrecovery.c.
References fb(), and PROMOTE_SIGNAL_FILE.
Referenced by CheckForStandbyTrigger(), and PostmasterMain().
|
static |
Definition at line 4112 of file xlogrecovery.c.
References ereport, errmsg, expectedTLEs, fb(), findNewestTimeLine(), lfirst, list_free_deep(), LOG, LSN_FORMAT_ARGS, readTimeLineHistory(), recoveryTargetTLI, and restoreTimeLineHistoryFiles().
Referenced by WaitForWALToBecomeAvailable().
Definition at line 2249 of file xlogrecovery.c.
References arg, buf, errcontext, initStringInfo(), LSN_FORMAT_ARGS, pfree(), XLogReaderState::ReadRecPtr, xlog_block_info(), and xlog_outdesc().
Referenced by ApplyWalRecord().
|
static |
Definition at line 4620 of file xlogrecovery.c.
References XLogRecoveryCtlData::currentChunkStartTime, fb(), XLogRecoveryCtlData::info_lck, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by WaitForWALToBecomeAvailable().
|
static |
Definition at line 4591 of file xlogrecovery.c.
References fb(), XLogRecoveryCtlData::info_lck, XLogRecoveryCtlData::recoveryLastXTime, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by recoveryStopsAfter().
Definition at line 4418 of file xlogrecovery.c.
References XLogRecoveryCtlData::info_lck, LocalPromoteIsTriggered, SetRecoveryPause(), XLogRecoveryCtlData::SharedPromoteIsTriggered, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by CheckForStandbyTrigger().
Definition at line 3064 of file xlogrecovery.c.
References ConditionVariableBroadcast(), fb(), XLogRecoveryCtlData::info_lck, RECOVERY_NOT_PAUSED, RECOVERY_PAUSE_REQUESTED, XLogRecoveryCtlData::recoveryNotPausedCV, XLogRecoveryCtlData::recoveryPauseState, SpinLockAcquire(), SpinLockRelease(), and XLogRecoveryCtl.
Referenced by PerformWalRecovery(), pg_wal_replay_pause(), pg_wal_replay_resume(), RecoveryRequiresIntParameter(), and SetPromoteIsTriggered().
Definition at line 1567 of file xlogrecovery.c.
References ArchiveRecoveryRequested, close, DisownLatch(), fb(), MAXPGPATH, pfree(), XLogReaderState::private_data, readFile, XLogRecoveryCtlData::recoveryWakeupLatch, snprintf, XLOGDIR, xlogprefetcher, XLogPrefetcherComputeStats(), XLogPrefetcherFree(), xlogreader, XLogReaderFree(), and XLogRecoveryCtl.
Referenced by StartupXLOG().
Definition at line 4381 of file xlogrecovery.c.
References currentSource, ereport, errmsg, LOG, pendingWalRcvRestart, WalRcvRunning(), and XLOG_FROM_STREAM.
Referenced by StartupRereadConfig().
Definition at line 1068 of file xlogrecovery.c.
References ArchiveRecoveryRequested, Assert, CStringGetDatum(), DatumGetTimestampTz(), DirectFunctionCall3, EnableHotStandby, ereport, errcode(), errhint(), errmsg, existsTimeLineHistory(), FATAL, fb(), findNewestTimeLine(), Int32GetDatum(), InvalidOid, ObjectIdGetDatum(), PrimaryConnInfo, RECOVERY_TARGET_ACTION_PAUSE, RECOVERY_TARGET_ACTION_SHUTDOWN, RECOVERY_TARGET_TIME, recovery_target_time_string, RECOVERY_TARGET_TIMELINE_CONTROLFILE, RECOVERY_TARGET_TIMELINE_LATEST, RECOVERY_TARGET_TIMELINE_NUMERIC, recoveryRestoreCommand, recoveryTarget, recoveryTargetAction, recoveryTargetTime, recoveryTargetTimeLineGoal, recoveryTargetTLI, recoveryTargetTLIRequested, StandbyModeRequested, timestamptz_in(), and WARNING.
Referenced by InitWalRecovery().
|
static |
Definition at line 2435 of file xlogrecovery.c.
References Assert, buf, BUFFER_LOCK_EXCLUSIVE, BufferGetPage(), BufferIsValid(), RelFileLocator::dbOid, elog, XLogReaderState::EndRecPtr, ereport, errcode(), errmsg_internal(), ERROR, XLogReaderState::errormsg_buf, FATAL, fb(), GetRmgr(), InvalidBuffer, LockBuffer(), memcpy(), PageGetLSN(), primary_image_masked, RBM_NORMAL_NO_LOG, RelFileLocator::relNumber, replay_image_masked, RestoreBlockImage(), RelFileLocator::spcOid, UnlockReleaseBuffer(), XLogReadBufferExtended(), XLogRecBlockImageApply, XLogRecGetBlockTagExtended(), XLogRecGetInfo, XLogRecGetRmid, XLogRecHasAnyBlockRefs, XLogRecHasBlockImage, XLogRecMaxBlockId, and XLR_CHECK_CONSISTENCY.
Referenced by ApplyWalRecord().
|
static |
Definition at line 3531 of file xlogrecovery.c.
References Assert, CheckForStandbyTrigger(), close, curFileTLI, currentSource, DEBUG2, elog, ERROR, expectedTLEs, fb(), flushedUpto, GetCurrentTimestamp(), GetWalRcvFlushRecPtr(), InArchiveRecovery, InvalidXLogRecPtr, KnownAssignedTransactionIdsIdleMaintenance(), lastSourceFailed, LOG, LSN_FORMAT_ARGS, now(), pendingWalRcvRestart, PrimaryConnInfo, PrimarySlotName, ProcessStartupProcInterrupts(), readFile, readSegNo, readSource, readTimeLineHistory(), receiveTLI, RECOVERY_NOT_PAUSED, RECOVERY_TARGET_TIMELINE_LATEST, recoveryPausesHere(), recoveryTargetTimeLineGoal, recoveryTargetTLI, XLogRecoveryCtlData::recoveryWakeupLatch, RedoStartLSN, RedoStartTLI, RequestXLogStreaming(), rescanLatestTimeLine(), ResetInstallXLogFileSegmentActive(), ResetLatch(), SetCurrentChunkStartTime(), SetInstallXLogFileSegmentActive(), StandbyMode, TimestampDifferenceExceeds(), TimestampDifferenceMilliseconds(), tliOfPointInHistory(), WaitLatch(), wal_receiver_create_temp_slot, wal_retrieve_retry_interval, WALRCV_STOPPING, WalRcvGetState(), WalRcvRequestApplyReply(), WalRcvStreaming(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_TIMEOUT, XLOG_FROM_ANY, XLOG_FROM_ARCHIVE, XLOG_FROM_PG_WAL, XLOG_FROM_STREAM, XLogFileRead(), XLogFileReadAnyTLI(), xlogprefetcher, XLogPrefetcherComputeStats(), XLogReceiptSource, XLogReceiptTime, XLogRecoveryCtl, XLogShutdownWalRcv(), xlogSourceNames, XLREAD_FAIL, XLREAD_SUCCESS, and XLREAD_WOULDBLOCK.
Referenced by XLogPageRead().
Definition at line 4484 of file xlogrecovery.c.
References XLogRecoveryCtlData::recoveryWakeupLatch, SetLatch(), and XLogRecoveryCtl.
Referenced by pg_wal_replay_pause(), StartupProcShutdownHandler(), StartupProcSigHupHandler(), StartupProcTriggerHandler(), WalRcvDie(), WalRcvWaitForStartPosition(), and XLogWalRcvFlush().
|
static |
Definition at line 2310 of file xlogrecovery.c.
References appendStringInfo(), appendStringInfoString(), buf, RelFileLocator::dbOid, fb(), MAIN_FORKNUM, RelFileLocator::relNumber, RelFileLocator::spcOid, XLogRecGetBlockTagExtended(), XLogRecHasBlockImage, and XLogRecMaxBlockId.
Referenced by rm_redo_error_callback().
| void xlog_outdesc | ( | StringInfo | buf, |
| XLogReaderState * | record | ||
| ) |
Definition at line 2271 of file xlogrecovery.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), buf, fb(), GetRmgr(), XLogRecGetInfo, XLogRecGetRmid, and XLR_INFO_MASK.
Referenced by PerformWalRecovery(), rm_redo_error_callback(), and XLogInsertRecord().
|
static |
Definition at line 4199 of file xlogrecovery.c.
References Assert, BasicOpenFile(), curFileTLI, elog, ereport, errcode_for_file_access(), errmsg, ERROR, fb(), fd(), GetCurrentTimestamp(), InRedo, IsInstallXLogFileSegmentActive(), KeepFileRestoredFromArchive(), MAXFNAMELEN, MAXPGPATH, PANIC, PG_BINARY, readSource, RestoreArchivedFile(), set_ps_display(), snprintf, source, wal_segment_size, XLOG_FROM_ARCHIVE, XLOG_FROM_PG_WAL, XLOG_FROM_STREAM, XLOGDIR, XLogFileName(), XLogFilePath(), XLogReceiptSource, and XLogReceiptTime.
Referenced by WaitForWALToBecomeAvailable(), and XLogFileReadAnyTLI().
|
static |
Definition at line 4281 of file xlogrecovery.c.
References curFileTLI, DEBUG1, DEBUG2, elog, ereport, errcode_for_file_access(), errmsg, expectedTLEs, fb(), fd(), lfirst, MAXPGPATH, readTimeLineHistory(), recoveryTargetTLI, source, TimeLineHistoryEntry::tli, wal_segment_size, XLByteToSeg, XLOG_FROM_ANY, XLOG_FROM_ARCHIVE, XLOG_FROM_PG_WAL, XLogFilePath(), XLogFileRead(), and XLogRecPtrIsValid.
Referenced by WaitForWALToBecomeAvailable().
|
static |
Definition at line 3274 of file xlogrecovery.c.
References AmStartupProcess, ArchiveRecoveryRequested, Assert, CHECKPOINT_CAUSE_XLOG, close, curFileTLI, emode_for_corrupt_record(), XLogReaderState::EndRecPtr, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errcode_for_file_access(), errmsg, errmsg_internal(), XLogReaderState::errormsg_buf, fb(), flushedUpto, GetRedoRecPtr(), IOCONTEXT_NORMAL, IOOBJECT_WAL, IOOP_READ, IsUnderPostmaster, lastSourceFailed, LSN_FORMAT_ARGS, MAXFNAMELEN, XLogReaderState::nonblocking, pg_pread, PG_USED_FOR_ASSERTS_ONLY, pgstat_count_io_op_time(), pgstat_prepare_io_time(), pgstat_report_wait_end(), pgstat_report_wait_start(), XLogReaderState::private_data, readFile, readLen, readOff, readSegNo, readSource, RequestCheckpoint(), XLogReaderState::seg, StandbyMode, track_wal_io_timing, WaitForWALToBecomeAvailable(), wal_segment_size, WALOpenSegment::ws_tli, XLByteInSeg, XLByteToSeg, XLOG_FROM_ANY, XLOG_FROM_STREAM, XLogCheckpointNeeded(), XLogFileName(), xlogreader, XLogReaderResetError(), XLogReaderValidatePageHeader(), XLogSegmentOffset, XLREAD_FAIL, XLREAD_SUCCESS, and XLREAD_WOULDBLOCK.
Referenced by InitWalRecovery().
|
static |
Definition at line 2044 of file xlogrecovery.c.
References abortedRecPtr, Assert, backupEndPoint, backupStartPoint, DEBUG1, elog, XLogReaderState::EndRecPtr, ereport, errmsg, FATAL, fb(), InvalidXLogRecPtr, LOG, LSN_FORMAT_ARGS, memcpy(), missingContrecPtr, XLogReaderState::overwrittenRecPtr, timestamptz_to_str(), XLOG_BACKUP_END, XLOG_OVERWRITE_CONTRECORD, XLogRecGetData, XLogRecGetInfo, and XLogRecGetRmid.
Referenced by ApplyWalRecord().
Definition at line 409 of file xlogrecovery.c.
References ConditionVariableInit(), fb(), XLogRecoveryCtlData::info_lck, InitSharedLatch(), XLogRecoveryCtlData::recoveryNotPausedCV, XLogRecoveryCtlData::recoveryWakeupLatch, SpinLockInit(), and XLogRecoveryCtl.
Definition at line 400 of file xlogrecovery.c.
References name, ShmemRequestStruct, and XLogRecoveryCtl.
Definition at line 4493 of file xlogrecovery.c.
References doRequestWalReceiverReply.
Referenced by xact_redo_commit().
|
static |
Definition at line 325 of file xlogrecovery.c.
Referenced by FinishWalRecovery(), InitWalRecovery(), ReadRecord(), StartupXLOG(), and xlogrecovery_redo().
Definition at line 88 of file xlogrecovery.c.
Referenced by CreateRestartPoint().
Definition at line 141 of file xlogrecovery.c.
Referenced by CheckRequiredParameterValues(), existsTimeLineHistory(), FinishWalRecovery(), InitWalRecovery(), PerformRecoveryXLogAction(), PerformWalRecovery(), ReadRecord(), readRecoverySignalFile(), readTimeLineHistory(), recoveryApplyDelay(), recoveryStopsAfter(), recoveryStopsBefore(), RestoreArchivedFile(), ShutdownWalRecovery(), StartupXLOG(), validateRecoveryParameters(), writeTimeLineHistory(), xlog_redo(), and XLogPageRead().
|
static |
Definition at line 286 of file xlogrecovery.c.
Referenced by CheckRecoveryConsistency(), InitWalRecovery(), and xlogrecovery_redo().
Definition at line 287 of file xlogrecovery.c.
Referenced by CheckRecoveryConsistency(), InitWalRecovery(), and read_backup_label().
|
static |
Definition at line 285 of file xlogrecovery.c.
Referenced by CheckRecoveryConsistency(), InitWalRecovery(), and xlogrecovery_redo().
|
static |
Definition at line 171 of file xlogrecovery.c.
Referenced by FinishWalRecovery(), InitWalRecovery(), and PerformWalRecovery().
|
static |
Definition at line 172 of file xlogrecovery.c.
Referenced by FinishWalRecovery(), InitWalRecovery(), and PerformWalRecovery().
|
static |
Definition at line 128 of file xlogrecovery.c.
Referenced by WaitForWALToBecomeAvailable(), XLogFileRead(), XLogFileReadAnyTLI(), and XLogPageRead().
|
static |
Definition at line 250 of file xlogrecovery.c.
Referenced by ReadRecord(), StartupRequestWalReceiverRestart(), and WaitForWALToBecomeAvailable().
|
static |
Definition at line 189 of file xlogrecovery.c.
Referenced by ApplyWalRecord(), and XLogRequestWalReceiverReply().
|
static |
Definition at line 127 of file xlogrecovery.c.
Referenced by checkTimeLineSwitch(), InitWalRecovery(), PrepareForIncrementalBackup(), ReadRecord(), rescanLatestTimeLine(), tliInHistory(), WaitForWALToBecomeAvailable(), and XLogFileReadAnyTLI().
|
static |
Definition at line 266 of file xlogrecovery.c.
Referenced by WaitForWALToBecomeAvailable(), and XLogPageRead().
Definition at line 142 of file xlogrecovery.c.
Referenced by CheckRecoveryConsistency(), FinishWalRecovery(), InitWalRecovery(), ReadRecord(), StartupXLOG(), WaitForWALToBecomeAvailable(), and xlog_redo().
Definition at line 207 of file xlogrecovery.c.
Referenced by PerformWalRecovery(), and XLogFileRead().
Definition at line 251 of file xlogrecovery.c.
Referenced by ReadRecord(), WaitForWALToBecomeAvailable(), and XLogPageRead().
Definition at line 180 of file xlogrecovery.c.
Referenced by CheckRecoveryConsistency(), HotStandbyActive(), HotStandbyActiveInReplay(), and recoveryPausesHere().
Definition at line 186 of file xlogrecovery.c.
Referenced by CheckForStandbyTrigger(), PromoteIsTriggered(), recoveryPausesHere(), and SetPromoteIsTriggered().
|
static |
Definition at line 282 of file xlogrecovery.c.
Referenced by CheckRecoveryConsistency(), checkTimeLineSwitch(), InitWalRecovery(), and ReadRecord().
|
static |
Definition at line 283 of file xlogrecovery.c.
Referenced by checkTimeLineSwitch(), InitWalRecovery(), and ReadRecord().
|
static |
Definition at line 326 of file xlogrecovery.c.
Referenced by FinishWalRecovery(), InitWalRecovery(), ReadRecord(), StartupXLOG(), and xlogrecovery_redo().
Definition at line 252 of file xlogrecovery.c.
Referenced by StartupRequestWalReceiverRestart(), and WaitForWALToBecomeAvailable().
Definition at line 307 of file xlogrecovery.c.
Referenced by InitWalRecovery(), and verifyBackupPageConsistency().
Definition at line 100 of file xlogrecovery.c.
Referenced by CheckAndGetDbnameFromConninfo(), pg_sync_replication_slots(), ReplSlotSyncWorkerMain(), slotsync_reread_config(), StartupRereadConfig(), validateRecoveryParameters(), ValidateSlotSyncParams(), and WaitForWALToBecomeAvailable().
Definition at line 101 of file xlogrecovery.c.
Referenced by slotsync_reread_config(), StartupRereadConfig(), validate_remote_info(), ValidateSlotSyncParams(), and WaitForWALToBecomeAvailable().
Definition at line 303 of file xlogrecovery.c.
Referenced by BackendInitialize(), CheckRecoveryConsistency(), log_invalid_page(), PerformWalRecovery(), PrepareRedoAdd(), process_pm_pmsignal(), recovery_create_dbdir(), recoveryApplyDelay(), recoveryStopsAfter(), and recoveryStopsBefore().
|
static |
Definition at line 234 of file xlogrecovery.c.
Referenced by FinishWalRecovery(), ReadRecord(), ShutdownWalRecovery(), WaitForWALToBecomeAvailable(), and XLogPageRead().
|
static |
Definition at line 237 of file xlogrecovery.c.
Referenced by ReadPageInternal(), XLogFindNextRecord(), and XLogPageRead().
|
static |
Definition at line 236 of file xlogrecovery.c.
Referenced by FinishWalRecovery(), XLogDecodeNextRecord(), and XLogPageRead().
|
static |
Definition at line 235 of file xlogrecovery.c.
Referenced by WaitForWALToBecomeAvailable(), and XLogPageRead().
|
static |
Definition at line 238 of file xlogrecovery.c.
Referenced by emode_for_corrupt_record(), WaitForWALToBecomeAvailable(), XLogFileRead(), and XLogPageRead().
|
static |
Definition at line 267 of file xlogrecovery.c.
Referenced by GetStandbyFlushRecPtr(), GetWalRcvFlushRecPtr(), and WaitForWALToBecomeAvailable().
| int recovery_min_apply_delay = 0 |
Definition at line 97 of file xlogrecovery.c.
Referenced by recoveryApplyDelay().
Definition at line 155 of file xlogrecovery.c.
Referenced by FinishWalRecovery(), and readRecoverySignalFile().
| const struct config_enum_entry recovery_target_action_options[] |
| char* recovery_target_time_string |
Definition at line 93 of file xlogrecovery.c.
Referenced by validateRecoveryParameters().
Definition at line 87 of file xlogrecovery.c.
Referenced by CleanupAfterArchiveRecovery().
Definition at line 86 of file xlogrecovery.c.
Referenced by RestoreArchivedFile(), and validateRecoveryParameters().
|
static |
Definition at line 336 of file xlogrecovery.c.
Referenced by getRecoveryStopReason(), recoveryStopsAfter(), and recoveryStopsBefore().
|
static |
Definition at line 334 of file xlogrecovery.c.
Referenced by getRecoveryStopReason(), recoveryStopsAfter(), and recoveryStopsBefore().
|
static |
Definition at line 335 of file xlogrecovery.c.
Referenced by getRecoveryStopReason(), recoveryStopsAfter(), and recoveryStopsBefore().
|
static |
Definition at line 333 of file xlogrecovery.c.
Referenced by getRecoveryStopReason(), recoveryStopsAfter(), and recoveryStopsBefore().
|
static |
Definition at line 332 of file xlogrecovery.c.
Referenced by getRecoveryStopReason(), recoveryStopsAfter(), and recoveryStopsBefore().
| RecoveryTargetType recoveryTarget = RECOVERY_TARGET_UNSET |
Definition at line 89 of file xlogrecovery.c.
Referenced by assign_recovery_target(), assign_recovery_target_lsn(), assign_recovery_target_name(), assign_recovery_target_time(), assign_recovery_target_xid(), getRecoveryStopReason(), InitWalRecovery(), PerformWalRecovery(), recoveryStopsAfter(), recoveryStopsBefore(), and validateRecoveryParameters().
| int recoveryTargetAction = RECOVERY_TARGET_ACTION_PAUSE |
Definition at line 91 of file xlogrecovery.c.
Referenced by PerformWalRecovery(), and validateRecoveryParameters().
Definition at line 90 of file xlogrecovery.c.
Referenced by recoveryStopsAfter(), and recoveryStopsBefore().
| XLogRecPtr recoveryTargetLSN |
Definition at line 96 of file xlogrecovery.c.
Referenced by assign_recovery_target_lsn(), InitWalRecovery(), recoveryStopsAfter(), and recoveryStopsBefore().
Definition at line 95 of file xlogrecovery.c.
Referenced by assign_recovery_target_name(), InitWalRecovery(), and recoveryStopsAfter().
| TimestampTz recoveryTargetTime |
Definition at line 94 of file xlogrecovery.c.
Referenced by InitWalRecovery(), recoveryStopsBefore(), and validateRecoveryParameters().
| RecoveryTargetTimeLineGoal recoveryTargetTimeLineGoal = RECOVERY_TARGET_TIMELINE_LATEST |
Definition at line 124 of file xlogrecovery.c.
Referenced by assign_recovery_target_timeline(), validateRecoveryParameters(), and WaitForWALToBecomeAvailable().
| TimeLineID recoveryTargetTLI = 0 |
Definition at line 126 of file xlogrecovery.c.
Referenced by InitWalRecovery(), rescanLatestTimeLine(), StartupXLOG(), validateRecoveryParameters(), WaitForWALToBecomeAvailable(), and XLogFileReadAnyTLI().
| TimeLineID recoveryTargetTLIRequested = 0 |
Definition at line 125 of file xlogrecovery.c.
Referenced by assign_recovery_target_timeline(), and validateRecoveryParameters().
| TransactionId recoveryTargetXid |
Definition at line 92 of file xlogrecovery.c.
Referenced by assign_recovery_target_xid(), InitWalRecovery(), recoveryStopsAfter(), and recoveryStopsBefore().
|
static |
Definition at line 173 of file xlogrecovery.c.
Referenced by InitWalRecovery(), PerformWalRecovery(), read_backup_label(), and WaitForWALToBecomeAvailable().
|
static |
Definition at line 174 of file xlogrecovery.c.
Referenced by InitWalRecovery(), PerformWalRecovery(), read_backup_label(), and WaitForWALToBecomeAvailable().
Definition at line 306 of file xlogrecovery.c.
Referenced by InitWalRecovery(), and verifyBackupPageConsistency().
Definition at line 154 of file xlogrecovery.c.
Referenced by FinishWalRecovery(), and readRecoverySignalFile().
Definition at line 151 of file xlogrecovery.c.
Referenced by EnableStandbyMode(), FinishWalRecovery(), PerformWalRecovery(), ReadRecord(), RestoreArchivedFile(), RestoreSlotFromDisk(), update_synced_slots_inactive_since(), WaitForWALToBecomeAvailable(), and XLogPageRead().
Definition at line 150 of file xlogrecovery.c.
Referenced by InitWalRecovery(), ReadRecord(), readRecoverySignalFile(), and validateRecoveryParameters().
Definition at line 102 of file xlogrecovery.c.
Referenced by StartupRereadConfig(), and WaitForWALToBecomeAvailable().
|
static |
Definition at line 195 of file xlogrecovery.c.
Referenced by FinishWalRecovery(), InitWalRecovery(), PerformWalRecovery(), ReadCheckpointRecord(), ReadRecord(), ShutdownWalRecovery(), and WaitForWALToBecomeAvailable().
|
static |
Definition at line 192 of file xlogrecovery.c.
Referenced by ApplyWalRecord(), extractPageMap(), findLastCheckpoint(), FinishWalRecovery(), GetWALRecordsInfo(), GetWalStats(), InitWalRecovery(), InitXLogReaderState(), PerformWalRecovery(), pg_get_wal_block_info(), pg_get_wal_record_info(), ReadCheckpointRecord(), ReadNextXLogRecord(), readOneRecord(), ReadRecord(), ShutdownWalRecovery(), SimpleXLogPageRead(), SummarizeDbaseRecord(), SummarizeSmgrRecord(), SummarizeWAL(), SummarizeXactRecord(), SummarizeXlogRecord(), XLogPageRead(), and XlogReadTwoPhaseData().
|
static |
Definition at line 263 of file xlogrecovery.c.
Referenced by GetXLogReceiptTime(), WaitForWALToBecomeAvailable(), and XLogFileRead().
|
static |
Definition at line 262 of file xlogrecovery.c.
Referenced by GetXLogReceiptTime(), PerformWalRecovery(), WaitForWALToBecomeAvailable(), and XLogFileRead().
| XLogRecoveryCtlData* XLogRecoveryCtl = NULL |
Definition at line 309 of file xlogrecovery.c.
Referenced by ApplyWalRecord(), CheckRecoveryConsistency(), ConfirmRecoveryPaused(), FinishWalRecovery(), GetCurrentChunkReplayStartTime(), GetCurrentReplayRecPtr(), GetLatestXTime(), GetRecoveryPauseState(), GetXLogReplayRecPtr(), HotStandbyActive(), InitWalRecovery(), PerformWalRecovery(), pg_stat_get_recovery(), PromoteIsTriggered(), recoveryApplyDelay(), recoveryPausesHere(), RecoveryRequiresIntParameter(), SetCurrentChunkStartTime(), SetLatestXTime(), SetPromoteIsTriggered(), SetRecoveryPause(), ShutdownWalRecovery(), WaitForWALToBecomeAvailable(), WakeupRecovery(), XLogRecoveryShmemInit(), and XLogRecoveryShmemRequest().
| const ShmemCallbacks XLogRecoveryShmemCallbacks |
Definition at line 314 of file xlogrecovery.c.
Definition at line 222 of file xlogrecovery.c.
Referenced by WaitForWALToBecomeAvailable().