Skip to content

Commit 11abd6c

Browse files
committed
Renumber CHECKPOINT_* flags.
Commit 7dbb606 added a new CHECKPOINT_FLUSH_ALL flag. As that commit needed to be backpatched I didn't change the numeric values of the existing flags as that could lead to nastly problems if any external code issued checkpoints. That's not a concern on master, so renumber them there. Also add a comment about CHECKPOINT_FLUSH_ALL above CreateCheckPoint().
1 parent 7dbb606 commit 11abd6c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7892,6 +7892,7 @@ LogCheckpointEnd(bool restartpoint)
78927892
* CHECKPOINT_FORCE: force a checkpoint even if no XLOG activity has occurred
78937893
* since the last one (implied by CHECKPOINT_IS_SHUTDOWN or
78947894
* CHECKPOINT_END_OF_RECOVERY).
7895+
* CHECKPOINT_FLUSH_ALL: also flush buffers of unlogged tables.
78957896
*
78967897
* Note: flags contains other bits, of interest here only for logging purposes.
78977898
* In particular note that this routine is synchronous and does not pay

src/include/access/xlog.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@ extern bool XLOG_DEBUG;
248248
* recovery */
249249
#define CHECKPOINT_IMMEDIATE 0x0004 /* Do it without delays */
250250
#define CHECKPOINT_FORCE 0x0008 /* Force even if no activity */
251+
#define CHECKPOINT_FLUSH_ALL 0x0010 /* Flush all pages, including those
252+
* belonging to unlogged tables */
251253
/* These are important to RequestCheckpoint */
252-
#define CHECKPOINT_WAIT 0x0010 /* Wait for completion */
254+
#define CHECKPOINT_WAIT 0x0020 /* Wait for completion */
253255
/* These indicate the cause of a checkpoint request */
254-
#define CHECKPOINT_CAUSE_XLOG 0x0020 /* XLOG consumption */
255-
#define CHECKPOINT_CAUSE_TIME 0x0040 /* Elapsed time */
256-
#define CHECKPOINT_FLUSH_ALL 0x0080 /* Flush all pages, including those
257-
* belonging to unlogged tables */
256+
#define CHECKPOINT_CAUSE_XLOG 0x0040 /* XLOG consumption */
257+
#define CHECKPOINT_CAUSE_TIME 0x0080 /* Elapsed time */
258258

259259
/* Checkpoint statistics */
260260
typedef struct CheckpointStatsData

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy