99 #define XLogArchivingActive() \
100 (AssertMacro(XLogArchiveMode == ARCHIVE_MODE_OFF || wal_level >= WAL_LEVEL_REPLICA), XLogArchiveMode > ARCHIVE_MODE_OFF)
102 #define XLogArchivingAlways() \
103 (AssertMacro(XLogArchiveMode == ARCHIVE_MODE_OFF || wal_level >= WAL_LEVEL_REPLICA), XLogArchiveMode == ARCHIVE_MODE_ALWAYS)
109 #define XLogIsNeeded() (wal_level >= WAL_LEVEL_REPLICA)
120 #define XLogHintBitIsNeeded() (DataChecksumsEnabled() || wal_log_hints)
123 #define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_REPLICA)
126 #define XLogLogicalInfoActive() (wal_level >= WAL_LEVEL_LOGICAL)
139 #define CHECKPOINT_IS_SHUTDOWN 0x0001
140 #define CHECKPOINT_END_OF_RECOVERY 0x0002
142 #define CHECKPOINT_IMMEDIATE 0x0004
143 #define CHECKPOINT_FORCE 0x0008
144 #define CHECKPOINT_FLUSH_ALL 0x0010
147 #define CHECKPOINT_WAIT 0x0020
148 #define CHECKPOINT_REQUESTED 0x0040
150 #define CHECKPOINT_CAUSE_XLOG 0x0080
151 #define CHECKPOINT_CAUSE_TIME 0x0100
156 #define XLOG_INCLUDE_ORIGIN 0x01
157 #define XLOG_MARK_UNIMPORTANT 0x02
206 bool topxid_included);
302 #define RECOVERY_SIGNAL_FILE "recovery.signal"
303 #define STANDBY_SIGNAL_FILE "standby.signal"
304 #define BACKUP_LABEL_FILE "backup_label"
305 #define BACKUP_LABEL_OLD "backup_label.old"
307 #define TABLESPACE_MAP "tablespace_map"
308 #define TABLESPACE_MAP_OLD "tablespace_map.old"
311 #define PROMOTE_SIGNAL_FILE "promote"
static int fd(const char *x, int i)
uint64 ckpt_agg_sync_time
TimestampTz ckpt_sync_end_t
DecodedXLogRecord * record
int XLogFileInit(XLogSegNo logsegno, TimeLineID logtli)
uint64 GetSystemIdentifier(void)
void UpdateFullPageWrites(void)
bool RecoveryInProgress(void)
void GetFullPageWriteInfo(XLogRecPtr *RedoRecPtr_p, bool *doPageWrites_p)
TimeLineID GetWALInsertionTimeLine(void)
PGDLLIMPORT bool log_checkpoints
void do_pg_abort_backup(int code, Datum arg)
XLogSegNo XLogGetLastRemovedSegno(void)
void xlog_desc(StringInfo buf, struct XLogReaderState *record)
Size WALReadFromBuffers(char *dstbuf, XLogRecPtr startptr, Size count, TimeLineID tli)
XLogRecPtr GetRedoRecPtr(void)
void SetInstallXLogFileSegmentActive(void)
XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata, XLogRecPtr fpw_lsn, uint8 flags, int num_fpi, bool topxid_included)
bool IsInstallXLogFileSegmentActive(void)
PGDLLIMPORT XLogRecPtr XactLastRecEnd
void BootStrapXLOG(uint32 data_checksum_version)
bool CreateRestartPoint(int flags)
PGDLLIMPORT int wal_sync_method
PGDLLIMPORT bool EnableHotStandby
XLogRecPtr GetInsertRecPtr(void)
SessionBackupState get_backup_status(void)
void CheckXLogRemoved(XLogSegNo segno, TimeLineID tli)
PGDLLIMPORT CheckpointStatsData CheckpointStats
WALAvailability GetWALAvailability(XLogRecPtr targetLSN)
PGDLLIMPORT int wal_retrieve_retry_interval
void ShutdownXLOG(int code, Datum arg)
bool DataChecksumsEnabled(void)
RecoveryState GetRecoveryState(void)
char * GetMockAuthenticationNonce(void)
PGDLLIMPORT int wal_compression
void XLogSetReplicationSlotMinimumLSN(XLogRecPtr lsn)
PGDLLIMPORT int CommitSiblings
void SwitchIntoArchiveRecovery(XLogRecPtr EndRecPtr, TimeLineID replayTLI)
PGDLLIMPORT int wal_decode_buffer_size
XLogRecPtr GetXLogInsertRecPtr(void)
void SetWalWriterSleeping(bool sleeping)
struct CheckpointStatsData CheckpointStatsData
int XLogFileOpen(XLogSegNo segno, TimeLineID tli)
XLogRecPtr GetFlushRecPtr(TimeLineID *insertTLI)
WalLevel GetActiveWalLevelOnStandby(void)
PGDLLIMPORT int CheckPointSegments
void xlog_redo(struct XLogReaderState *record)
void InitializeWalConsistencyChecking(void)
PGDLLIMPORT bool fullPageWrites
void RemoveNonParentXlogFiles(XLogRecPtr switchpoint, TimeLineID newTLI)
XLogRecPtr GetLastImportantRecPtr(void)
PGDLLIMPORT XLogRecPtr ProcLastRecPtr
PGDLLIMPORT char * wal_consistency_checking_string
bool XLogNeedsFlush(XLogRecPtr record)
PGDLLIMPORT int wal_segment_size
void register_persistent_abort_backup_handler(void)
void ReachedEndOfBackup(XLogRecPtr EndRecPtr, TimeLineID tli)
void LocalProcessControlFile(bool reset)
XLogSegNo XLogGetOldestSegno(TimeLineID tli)
PGDLLIMPORT int XLogArchiveMode
XLogRecPtr GetXLogWriteRecPtr(void)
PGDLLIMPORT char * XLogArchiveCommand
PGDLLIMPORT int wal_keep_size_mb
bool XLogBackgroundFlush(void)
PGDLLIMPORT bool * wal_consistency_checking
PGDLLIMPORT int max_slot_wal_keep_size_mb
bool XLogInsertAllowed(void)
void do_pg_backup_start(const char *backupidstr, bool fast, List **tablespaces, BackupState *state, StringInfo tblspcmapfile)
PGDLLIMPORT bool wal_init_zero
PGDLLIMPORT int min_wal_size_mb
PGDLLIMPORT int CommitDelay
XLogRecPtr XLogRestorePoint(const char *rpName)
const char * xlog_identify(uint8 info)
PGDLLIMPORT int XLOGbuffers
TimeLineID GetWALInsertionTimeLineIfSet(void)
void do_pg_backup_stop(BackupState *state, bool waitforarchive)
PGDLLIMPORT bool wal_recycle
bool CreateCheckPoint(int flags)
XLogRecPtr GetFakeLSNForUnloggedRel(void)
PGDLLIMPORT int XLogArchiveTimeout
void XLogPutNextOid(Oid nextOid)
void XLogFlush(XLogRecPtr record)
PGDLLIMPORT XLogRecPtr XactLastCommitEnd
PGDLLIMPORT int wal_level
PGDLLIMPORT bool wal_log_hints
void XLogShutdownWalRcv(void)
void issue_xlog_fsync(int fd, XLogSegNo segno, TimeLineID tli)
PGDLLIMPORT int max_wal_size_mb
void XLogSetAsyncXactLSN(XLogRecPtr asyncXactLSN)
PGDLLIMPORT bool track_wal_io_timing
bool XLogCheckpointNeeded(XLogSegNo new_segno)
@ WAL_SYNC_METHOD_FDATASYNC
@ WAL_SYNC_METHOD_FSYNC_WRITETHROUGH
@ WAL_SYNC_METHOD_OPEN_DSYNC