PostgreSQL Source Code  git master
xlog.h
Go to the documentation of this file.
1 /*
2  * xlog.h
3  *
4  * PostgreSQL write-ahead log manager
5  *
6  * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/access/xlog.h
10  */
11 #ifndef XLOG_H
12 #define XLOG_H
13 
14 #include "access/rmgr.h"
15 #include "access/xlogdefs.h"
16 #include "access/xloginsert.h"
17 #include "access/xlogreader.h"
18 #include "datatype/timestamp.h"
19 #include "lib/stringinfo.h"
20 #include "nodes/pg_list.h"
21 #include "storage/fd.h"
22 
23 
24 /* Sync methods */
25 #define SYNC_METHOD_FSYNC 0
26 #define SYNC_METHOD_FDATASYNC 1
27 #define SYNC_METHOD_OPEN 2 /* for O_SYNC */
28 #define SYNC_METHOD_FSYNC_WRITETHROUGH 3
29 #define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */
30 extern int sync_method;
31 
32 extern PGDLLIMPORT TimeLineID ThisTimeLineID; /* current TLI */
33 
34 /*
35  * Prior to 8.4, all activity during recovery was carried out by the startup
36  * process. This local variable continues to be used in many parts of the
37  * code to indicate actions taken by RecoveryManagers. Other processes that
38  * potentially perform work during recovery should check RecoveryInProgress().
39  * See XLogCtl notes in xlog.c.
40  */
41 extern bool InRecovery;
42 
43 /*
44  * Like InRecovery, standbyState is only valid in the startup process.
45  * In all other processes it will have the value STANDBY_DISABLED (so
46  * InHotStandby will read as false).
47  *
48  * In DISABLED state, we're performing crash recovery or hot standby was
49  * disabled in postgresql.conf.
50  *
51  * In INITIALIZED state, we've run InitRecoveryTransactionEnvironment, but
52  * we haven't yet processed a RUNNING_XACTS or shutdown-checkpoint WAL record
53  * to initialize our primary-transaction tracking system.
54  *
55  * When the transaction tracking is initialized, we enter the SNAPSHOT_PENDING
56  * state. The tracked information might still be incomplete, so we can't allow
57  * connections yet, but redo functions must update the in-memory state when
58  * appropriate.
59  *
60  * In SNAPSHOT_READY mode, we have full knowledge of transactions that are
61  * (or were) running on the primary at the current WAL location. Snapshots
62  * can be taken, and read-only queries can be run.
63  */
64 typedef enum
65 {
71 
73 
74 #define InHotStandby (standbyState >= STANDBY_SNAPSHOT_PENDING)
75 
76 /*
77  * Recovery target type.
78  * Only set during a Point in Time recovery, not when in standby mode.
79  */
80 typedef enum
81 {
89 
90 /*
91  * Recovery target TimeLine goal
92  */
93 typedef enum
94 {
99 
103 
104 extern bool reachedConsistency;
105 
106 /* these variables are GUC parameters related to XLOG */
107 extern int wal_segment_size;
108 extern int min_wal_size_mb;
109 extern int max_wal_size_mb;
110 extern int wal_keep_size_mb;
111 extern int max_slot_wal_keep_size_mb;
112 extern int XLOGbuffers;
113 extern int XLogArchiveTimeout;
114 extern int wal_retrieve_retry_interval;
115 extern char *XLogArchiveCommand;
116 extern bool EnableHotStandby;
117 extern bool fullPageWrites;
118 extern bool wal_log_hints;
119 extern bool wal_compression;
120 extern bool wal_init_zero;
121 extern bool wal_recycle;
122 extern bool *wal_consistency_checking;
124 extern bool log_checkpoints;
125 extern char *recoveryRestoreCommand;
126 extern char *recoveryEndCommand;
127 extern char *archiveCleanupCommand;
128 extern bool recoveryTargetInclusive;
129 extern int recoveryTargetAction;
130 extern int recovery_min_apply_delay;
131 extern char *PrimaryConnInfo;
132 extern char *PrimarySlotName;
134 extern bool track_wal_io_timing;
135 extern int wal_decode_buffer_size;
136 
137 /* indirectly set via GUC system */
139 extern char *recovery_target_time_string;
140 extern const char *recoveryTargetName;
143 extern char *PromoteTriggerFile;
147 
148 extern int CheckPointSegments;
149 
150 /* option set locally in startup process only when signal files exist */
151 extern bool StandbyModeRequested;
152 extern bool StandbyMode;
153 
154 /* Archive modes */
155 typedef enum ArchiveMode
156 {
157  ARCHIVE_MODE_OFF = 0, /* disabled */
158  ARCHIVE_MODE_ON, /* enabled while server is running normally */
159  ARCHIVE_MODE_ALWAYS /* enabled always (even during recovery) */
160 } ArchiveMode;
161 extern int XLogArchiveMode;
162 
163 /* WAL levels */
164 typedef enum WalLevel
165 {
169 } WalLevel;
170 
171 /* Recovery states */
172 typedef enum RecoveryState
173 {
174  RECOVERY_STATE_CRASH = 0, /* crash recovery */
175  RECOVERY_STATE_ARCHIVE, /* archive recovery */
176  RECOVERY_STATE_DONE /* currently in production */
177 } RecoveryState;
178 
179 /* Recovery pause states */
180 typedef enum RecoveryPauseState
181 {
182  RECOVERY_NOT_PAUSED, /* pause not requested */
183  RECOVERY_PAUSE_REQUESTED, /* pause requested, but not yet paused */
184  RECOVERY_PAUSED /* recovery is paused */
186 
187 extern PGDLLIMPORT int wal_level;
188 
189 /* Is WAL archiving enabled (always or only while server is running normally)? */
190 #define XLogArchivingActive() \
191  (AssertMacro(XLogArchiveMode == ARCHIVE_MODE_OFF || wal_level >= WAL_LEVEL_REPLICA), XLogArchiveMode > ARCHIVE_MODE_OFF)
192 /* Is WAL archiving enabled always (even during recovery)? */
193 #define XLogArchivingAlways() \
194  (AssertMacro(XLogArchiveMode == ARCHIVE_MODE_OFF || wal_level >= WAL_LEVEL_REPLICA), XLogArchiveMode == ARCHIVE_MODE_ALWAYS)
195 #define XLogArchiveCommandSet() (XLogArchiveCommand[0] != '\0')
196 
197 /*
198  * Is WAL-logging necessary for archival or log-shipping, or can we skip
199  * WAL-logging if we fsync() the data before committing instead?
200  */
201 #define XLogIsNeeded() (wal_level >= WAL_LEVEL_REPLICA)
202 
203 /*
204  * Is a full-page image needed for hint bit updates?
205  *
206  * Normally, we don't WAL-log hint bit updates, but if checksums are enabled,
207  * we have to protect them against torn page writes. When you only set
208  * individual bits on a page, it's still consistent no matter what combination
209  * of the bits make it to disk, but the checksum wouldn't match. Also WAL-log
210  * them if forced by wal_log_hints=on.
211  */
212 #define XLogHintBitIsNeeded() (DataChecksumsEnabled() || wal_log_hints)
213 
214 /* Do we need to WAL-log information required only for Hot Standby and logical replication? */
215 #define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_REPLICA)
216 
217 /* Do we need to WAL-log information required only for logical replication? */
218 #define XLogLogicalInfoActive() (wal_level >= WAL_LEVEL_LOGICAL)
219 
220 #ifdef WAL_DEBUG
221 extern bool XLOG_DEBUG;
222 #endif
223 
224 /*
225  * OR-able request flag bits for checkpoints. The "cause" bits are used only
226  * for logging purposes. Note: the flags must be defined so that it's
227  * sensible to OR together request flags arising from different requestors.
228  */
229 
230 /* These directly affect the behavior of CreateCheckPoint and subsidiaries */
231 #define CHECKPOINT_IS_SHUTDOWN 0x0001 /* Checkpoint is for shutdown */
232 #define CHECKPOINT_END_OF_RECOVERY 0x0002 /* Like shutdown checkpoint, but
233  * issued at end of WAL recovery */
234 #define CHECKPOINT_IMMEDIATE 0x0004 /* Do it without delays */
235 #define CHECKPOINT_FORCE 0x0008 /* Force even if no activity */
236 #define CHECKPOINT_FLUSH_ALL 0x0010 /* Flush all pages, including those
237  * belonging to unlogged tables */
238 /* These are important to RequestCheckpoint */
239 #define CHECKPOINT_WAIT 0x0020 /* Wait for completion */
240 #define CHECKPOINT_REQUESTED 0x0040 /* Checkpoint request has been made */
241 /* These indicate the cause of a checkpoint request */
242 #define CHECKPOINT_CAUSE_XLOG 0x0080 /* XLOG consumption */
243 #define CHECKPOINT_CAUSE_TIME 0x0100 /* Elapsed time */
244 
245 /*
246  * Flag bits for the record being inserted, set using XLogSetRecordFlags().
247  */
248 #define XLOG_INCLUDE_ORIGIN 0x01 /* include the replication origin */
249 #define XLOG_MARK_UNIMPORTANT 0x02 /* record not important for durability */
250 #define XLOG_INCLUDE_XID 0x04 /* include XID of top-level xact */
251 
252 
253 /* Checkpoint statistics */
254 typedef struct CheckpointStatsData
255 {
256  TimestampTz ckpt_start_t; /* start of checkpoint */
257  TimestampTz ckpt_write_t; /* start of flushing buffers */
258  TimestampTz ckpt_sync_t; /* start of fsyncs */
259  TimestampTz ckpt_sync_end_t; /* end of fsyncs */
260  TimestampTz ckpt_end_t; /* end of checkpoint */
261 
262  int ckpt_bufs_written; /* # of buffers written */
263 
264  int ckpt_segs_added; /* # of new xlog segments created */
265  int ckpt_segs_removed; /* # of xlog segments deleted */
266  int ckpt_segs_recycled; /* # of xlog segments recycled */
267 
268  int ckpt_sync_rels; /* # of relations synced */
269  uint64 ckpt_longest_sync; /* Longest sync for one relation */
270  uint64 ckpt_agg_sync_time; /* The sum of all the individual sync
271  * times, which is not necessarily the
272  * same as the total elapsed time for the
273  * entire sync phase. */
275 
277 
278 /*
279  * GetWALAvailability return codes
280  */
281 typedef enum WALAvailability
282 {
283  WALAVAIL_INVALID_LSN, /* parameter error */
284  WALAVAIL_RESERVED, /* WAL segment is within max_wal_size */
285  WALAVAIL_EXTENDED, /* WAL segment is reserved by a slot or
286  * wal_keep_size */
287  WALAVAIL_UNRESERVED, /* no longer reserved, but not removed yet */
288  WALAVAIL_REMOVED /* WAL segment has been removed */
290 
291 struct XLogRecData;
292 
293 extern XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata,
294  XLogRecPtr fpw_lsn,
295  uint8 flags,
296  int num_fpi);
297 extern void XLogFlush(XLogRecPtr RecPtr);
298 extern bool XLogBackgroundFlush(void);
299 extern bool XLogNeedsFlush(XLogRecPtr RecPtr);
300 extern int XLogFileInit(XLogSegNo segno, bool *use_existent, bool use_lock);
301 extern int XLogFileOpen(XLogSegNo segno);
302 
303 extern void CheckXLogRemoved(XLogSegNo segno, TimeLineID tli);
305 extern void XLogSetAsyncXactLSN(XLogRecPtr record);
307 
308 extern void xlog_redo(XLogReaderState *record);
309 extern void xlog_desc(StringInfo buf, XLogReaderState *record);
310 extern const char *xlog_identify(uint8 info);
311 
312 extern void issue_xlog_fsync(int fd, XLogSegNo segno);
313 
314 extern bool RecoveryInProgress(void);
315 extern RecoveryState GetRecoveryState(void);
316 extern bool HotStandbyActive(void);
317 extern bool HotStandbyActiveInReplay(void);
318 extern bool XLogInsertAllowed(void);
319 extern void GetXLogReceiptTime(TimestampTz *rtime, bool *fromStream);
320 extern XLogRecPtr GetXLogReplayRecPtr(TimeLineID *replayTLI);
321 extern XLogRecPtr GetXLogInsertRecPtr(void);
322 extern XLogRecPtr GetXLogWriteRecPtr(void);
324 extern void SetRecoveryPause(bool recoveryPause);
325 extern TimestampTz GetLatestXTime(void);
327 
328 extern void UpdateControlFile(void);
329 extern uint64 GetSystemIdentifier(void);
330 extern char *GetMockAuthenticationNonce(void);
331 extern bool DataChecksumsEnabled(void);
333 extern Size XLOGShmemSize(void);
334 extern void XLOGShmemInit(void);
335 extern void BootStrapXLOG(void);
336 extern void LocalProcessControlFile(bool reset);
337 extern void StartupXLOG(void);
338 extern void ShutdownXLOG(int code, Datum arg);
339 extern void InitXLOGAccess(void);
340 extern void CreateCheckPoint(int flags);
341 extern bool CreateRestartPoint(int flags);
344 extern void XLogPutNextOid(Oid nextOid);
345 extern XLogRecPtr XLogRestorePoint(const char *rpName);
346 extern void UpdateFullPageWrites(void);
347 extern void GetFullPageWriteInfo(XLogRecPtr *RedoRecPtr_p, bool *doPageWrites_p);
348 extern XLogRecPtr GetRedoRecPtr(void);
349 extern XLogRecPtr GetInsertRecPtr(void);
350 extern XLogRecPtr GetFlushRecPtr(void);
352 extern void RemovePromoteSignalFiles(void);
353 
354 extern bool PromoteIsTriggered(void);
355 extern bool CheckPromoteSignal(void);
356 extern void WakeupRecovery(void);
357 extern void SetWalWriterSleeping(bool sleeping);
358 
359 extern void StartupRequestWalReceiverRestart(void);
360 extern void XLogRequestWalReceiverReply(void);
361 
362 extern void assign_max_wal_size(int newval, void *extra);
363 extern void assign_checkpoint_completion_target(double newval, void *extra);
364 
365 /*
366  * Routines to start, stop, and get status of a base backup.
367  */
368 
369 /*
370  * Session-level status of base backups
371  *
372  * This is used in parallel with the shared memory status to control parallel
373  * execution of base backup functions for a given session, be it a backend
374  * dedicated to replication or a normal backend connected to a database. The
375  * update of the session-level status happens at the same time as the shared
376  * memory counters to keep a consistent global and local state of the backups
377  * running.
378  */
379 typedef enum SessionBackupState
380 {
385 
386 extern XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast,
387  TimeLineID *starttli_p, StringInfo labelfile,
388  List **tablespaces, StringInfo tblspcmapfile);
389 extern XLogRecPtr do_pg_stop_backup(char *labelfile, bool waitforarchive,
390  TimeLineID *stoptli_p);
391 extern void do_pg_abort_backup(int code, Datum arg);
394 
395 /* File path names (all relative to $PGDATA) */
396 #define RECOVERY_SIGNAL_FILE "recovery.signal"
397 #define STANDBY_SIGNAL_FILE "standby.signal"
398 #define BACKUP_LABEL_FILE "backup_label"
399 #define BACKUP_LABEL_OLD "backup_label.old"
400 
401 #define TABLESPACE_MAP "tablespace_map"
402 #define TABLESPACE_MAP_OLD "tablespace_map.old"
403 
404 /* files to signal promotion to primary */
405 #define PROMOTE_SIGNAL_FILE "promote"
406 
407 #endif /* XLOG_H */
void CreateCheckPoint(int flags)
Definition: xlog.c:8919
struct CheckpointStatsData CheckpointStatsData
XLogRecPtr GetXLogWriteRecPtr(void)
Definition: xlog.c:11763
uint64 ckpt_agg_sync_time
Definition: xlog.h:270
TimeLineID recoveryTargetTLI
Definition: xlog.c:345
XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, StringInfo labelfile, List **tablespaces, StringInfo tblspcmapfile)
Definition: xlog.c:10749
const char * recoveryTargetName
Definition: xlog.c:293
TimestampTz ckpt_sync_end_t
Definition: xlog.h:259
bool CreateRestartPoint(int flags)
Definition: xlog.c:9465
int ckpt_sync_rels
Definition: xlog.h:268
bool XLogInsertAllowed(void)
Definition: xlog.c:8350
bool recoveryTargetInclusive
Definition: xlog.c:288
char * recovery_target_time_string
Definition: xlog.c:291
int min_wal_size_mb
Definition: xlog.c:93
bool XLogNeedsFlush(XLogRecPtr RecPtr)
Definition: xlog.c:3202
uint32 TimeLineID
Definition: xlogdefs.h:59
int wal_decode_buffer_size
Definition: xlog.c:114
XLogRecPtr GetRedoRecPtr(void)
Definition: xlog.c:8529
bool track_wal_io_timing
Definition: xlog.c:115
int wal_keep_size_mb
Definition: xlog.c:94
bool DataChecksumsEnabled(void)
Definition: xlog.c:4985
bool wal_receiver_create_temp_slot
Definition: xlog.c:302
void WakeupRecovery(void)
Definition: xlog.c:12935
uint32 TransactionId
Definition: c.h:587
void XLogFlush(XLogRecPtr RecPtr)
Definition: xlog.c:2881
void xlog_desc(StringInfo buf, XLogReaderState *record)
Definition: xlogdesc.c:37
bool HotStandbyActive(void)
Definition: xlog.c:8311
int64 TimestampTz
Definition: timestamp.h:39
int XLogFileOpen(XLogSegNo segno)
Definition: xlog.c:3695
void reset(void)
Definition: sql-declare.c:562
int recoveryTargetAction
Definition: xlog.c:289
WALAvailability
Definition: xlog.h:281
WALAvailability GetWALAvailability(XLogRecPtr targetLSN)
Definition: xlog.c:9725
TimestampTz ckpt_start_t
Definition: xlog.h:256
XLogRecPtr XactLastRecEnd
Definition: xlog.c:365
RecoveryTargetTimeLineGoal
Definition: xlog.h:93
bool wal_log_hints
Definition: xlog.c:101
void LocalProcessControlFile(bool reset)
Definition: xlog.c:5085
unsigned char uint8
Definition: c.h:439
char * GetMockAuthenticationNonce(void)
Definition: xlog.c:4975
int ckpt_segs_recycled
Definition: xlog.h:266
bool fullPageWrites
Definition: xlog.c:100
XLogSegNo XLogGetLastRemovedSegno(void)
Definition: xlog.c:4007
int max_wal_size_mb
Definition: xlog.c:92
RecoveryState GetRecoveryState(void)
Definition: xlog.c:8290
char * wal_consistency_checking_string
Definition: xlog.c:103
unsigned int Oid
Definition: postgres_ext.h:31
void SetRecoveryPause(bool recoveryPause)
Definition: xlog.c:6123
bool CheckPromoteSignal(void)
Definition: xlog.c:12920
XLogRecPtr GetXLogReplayRecPtr(TimeLineID *replayTLI)
Definition: xlog.c:11728
static int fd(const char *x, int i)
Definition: preproc-init.c:105
void UpdateFullPageWrites(void)
Definition: xlog.c:10002
char * recoveryRestoreCommand
Definition: xlog.c:284
RecoveryTargetTimeLineGoal recoveryTargetTimeLineGoal
Definition: xlog.c:343
bool XLogBackgroundFlush(void)
Definition: xlog.c:3070
#define PGDLLIMPORT
Definition: c.h:1317
void xlog_redo(XLogReaderState *record)
Definition: xlog.c:10113
bool wal_init_zero
Definition: xlog.c:105
void XLogSetReplicationSlotMinimumLSN(XLogRecPtr lsn)
Definition: xlog.c:2763
void XLogSetAsyncXactLSN(XLogRecPtr record)
Definition: xlog.c:2722
void CheckXLogRemoved(XLogSegNo segno, TimeLineID tli)
Definition: xlog.c:3976
XLogRecPtr GetInsertRecPtr(void)
Definition: xlog.c:8573
bool reachedConsistency
Definition: xlog.c:870
bool wal_compression
Definition: xlog.c:102
void assign_checkpoint_completion_target(double newval, void *extra)
Definition: xlog.c:2346
bool * wal_consistency_checking
Definition: xlog.c:104
bool PromoteIsTriggered(void)
Definition: xlog.c:12839
void UpdateControlFile(void)
Definition: xlog.c:4956
RecoveryPauseState
Definition: xlog.h:180
int XLogArchiveTimeout
Definition: xlog.c:96
int XLogArchiveMode
Definition: xlog.c:97
const char * xlog_identify(uint8 info)
Definition: xlogdesc.c:145
char * recoveryEndCommand
Definition: xlog.c:285
void InitXLOGAccess(void)
Definition: xlog.c:8503
HotStandbyState standbyState
Definition: xlog.c:212
SessionBackupState
Definition: xlog.h:379
char * PrimaryConnInfo
Definition: xlog.c:299
PGDLLIMPORT int wal_level
Definition: xlog.c:109
bool EnableHotStandby
Definition: xlog.c:99
static char * buf
Definition: pg_test_fsync.c:68
XLogRecPtr GetXLogInsertRecPtr(void)
Definition: xlog.c:11747
int XLOGbuffers
Definition: xlog.c:95
uint64 XLogSegNo
Definition: xlogdefs.h:48
RecoveryTargetType recoveryTarget
Definition: xlog.c:287
char * PromoteTriggerFile
Definition: xlog.c:301
RecoveryTargetType
Definition: xlog.h:80
void RemovePromoteSignalFiles(void)
Definition: xlog.c:12911
int ckpt_segs_removed
Definition: xlog.h:265
bool log_checkpoints
Definition: xlog.c:107
bool StandbyMode
Definition: xlog.c:305
XLogRecPtr GetFlushRecPtr(void)
Definition: xlog.c:8589
int max_slot_wal_keep_size_mb
Definition: xlog.c:113
int recovery_min_apply_delay
Definition: xlog.c:295
int ckpt_bufs_written
Definition: xlog.h:262
void register_persistent_abort_backup_handler(void)
Definition: xlog.c:11712
void StartupXLOG(void)
Definition: xlog.c:6450
int wal_segment_size
Definition: xlog.c:121
bool HotStandbyActiveInReplay(void)
Definition: xlog.c:8336
int CheckPointSegments
Definition: xlog.c:134
uintptr_t Datum
Definition: postgres.h:411
bool StandbyModeRequested
Definition: xlog.c:298
SessionBackupState get_backup_status(void)
Definition: xlog.c:11246
void issue_xlog_fsync(int fd, XLogSegNo segno)
Definition: xlog.c:10629
RecoveryPauseState GetRecoveryPauseState(void)
Definition: xlog.c:6103
XLogRecPtr ProcLastRecPtr
Definition: xlog.c:364
bool InRecovery
Definition: xlog.c:209
TimestampTz GetCurrentChunkReplayStartTime(void)
Definition: xlog.c:6293
XLogRecPtr GetLastImportantRecPtr(void)
Definition: xlog.c:8607
int XLogFileInit(XLogSegNo segno, bool *use_existent, bool use_lock)
Definition: xlog.c:3288
int sync_method
Definition: xlog.c:108
uint64 XLogRecPtr
Definition: xlogdefs.h:21
XLogRecPtr do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p)
Definition: xlog.c:11267
PGDLLIMPORT XLogRecPtr XactLastCommitEnd
Definition: xlog.c:366
void SetWalWriterSleeping(bool sleeping)
Definition: xlog.c:12944
void ShutdownXLOG(int code, Datum arg)
Definition: xlog.c:8653
XLogRecPtr GetFakeLSNForUnloggedRel(void)
Definition: xlog.c:5001
void assign_max_wal_size(int newval, void *extra)
Definition: xlog.c:2339
ArchiveMode
Definition: xlog.h:155
size_t Size
Definition: c.h:540
TimestampTz GetLatestXTime(void)
Definition: xlog.c:6263
TimestampTz ckpt_write_t
Definition: xlog.h:257
#define newval
void XLogRequestWalReceiverReply(void)
Definition: xlog.c:12955
XLogRecPtr XLogRestorePoint(const char *rpName)
Definition: xlog.c:9914
Size XLOGShmemSize(void)
Definition: xlog.c:5096
bool RecoveryInProgress(void)
Definition: xlog.c:8237
TransactionId recoveryTargetXid
Definition: xlog.c:290
TimestampTz ckpt_sync_t
Definition: xlog.h:258
void do_pg_abort_backup(int code, Datum arg)
Definition: xlog.c:11680
XLogRecPtr recoveryTargetLSN
Definition: xlog.c:294
int ckpt_segs_added
Definition: xlog.h:264
void XLOGShmemInit(void)
Definition: xlog.c:5137
char * archiveCleanupCommand
Definition: xlog.c:286
bool wal_recycle
Definition: xlog.c:106
void * arg
CheckpointStatsData CheckpointStats
Definition: xlog.c:190
PGDLLIMPORT TimeLineID ThisTimeLineID
Definition: xlog.c:196
XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata, XLogRecPtr fpw_lsn, uint8 flags, int num_fpi)
Definition: xlog.c:1005
void GetFullPageWriteInfo(XLogRecPtr *RedoRecPtr_p, bool *doPageWrites_p)
Definition: xlog.c:8558
RecoveryState
Definition: xlog.h:172
int wal_retrieve_retry_interval
Definition: xlog.c:112
void StartupRequestWalReceiverRestart(void)
Definition: xlog.c:12788
void BootStrapXLOG(void)
Definition: xlog.c:5249
void XLogPutNextOid(Oid nextOid)
Definition: xlog.c:9859
Definition: pg_list.h:50
void GetXLogReceiptTime(TimestampTz *rtime, bool *fromStream)
Definition: xlog.c:6309
uint64 GetSystemIdentifier(void)
Definition: xlog.c:4965
XLogRecPtr CalculateMaxmumSafeLSN(void)
TimeLineID recoveryTargetTLIRequested
Definition: xlog.c:344
TimestampTz ckpt_end_t
Definition: xlog.h:260
HotStandbyState
Definition: xlog.h:64
WalLevel
Definition: xlog.h:164
uint64 ckpt_longest_sync
Definition: xlog.h:269
char * XLogArchiveCommand
Definition: xlog.c:98
char * PrimarySlotName
Definition: xlog.c:300