mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
Rename CHECKPOINT_IMMEDIATE to CHECKPOINT_FAST.
The new name more accurately reflects the effects of this flag on a requested checkpoint. Checkpoint-related log messages (i.e., those controlled by the log_checkpoints configuration parameter) will now say "fast" instead of "immediate", too. Likewise, references to "immediate" checkpoints in the documentation have been updated to say "fast". This is preparatory work for a follow-up commit that will add a MODE option to the CHECKPOINT command. Author: Christoph Berg <myon@debian.org> Discussion: https://postgr.es/m/aDnaKTEf-0dLiEfz%40msg.df7cb.de
This commit is contained in:
@@ -6486,7 +6486,7 @@ PerformRecoveryXLogAction(void)
|
||||
else
|
||||
{
|
||||
RequestCheckpoint(CHECKPOINT_END_OF_RECOVERY |
|
||||
CHECKPOINT_IMMEDIATE |
|
||||
CHECKPOINT_FAST |
|
||||
CHECKPOINT_WAIT);
|
||||
}
|
||||
|
||||
@@ -6795,7 +6795,7 @@ ShutdownXLOG(int code, Datum arg)
|
||||
WalSndWaitStopping();
|
||||
|
||||
if (RecoveryInProgress())
|
||||
CreateRestartPoint(CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_IMMEDIATE);
|
||||
CreateRestartPoint(CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_FAST);
|
||||
else
|
||||
{
|
||||
/*
|
||||
@@ -6807,7 +6807,7 @@ ShutdownXLOG(int code, Datum arg)
|
||||
if (XLogArchivingActive())
|
||||
RequestXLogSwitch(false);
|
||||
|
||||
CreateCheckPoint(CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_IMMEDIATE);
|
||||
CreateCheckPoint(CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_FAST);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6823,7 +6823,7 @@ LogCheckpointStart(int flags, bool restartpoint)
|
||||
(errmsg("restartpoint starting:%s%s%s%s%s%s%s%s",
|
||||
(flags & CHECKPOINT_IS_SHUTDOWN) ? " shutdown" : "",
|
||||
(flags & CHECKPOINT_END_OF_RECOVERY) ? " end-of-recovery" : "",
|
||||
(flags & CHECKPOINT_IMMEDIATE) ? " immediate" : "",
|
||||
(flags & CHECKPOINT_FAST) ? " fast" : "",
|
||||
(flags & CHECKPOINT_FORCE) ? " force" : "",
|
||||
(flags & CHECKPOINT_WAIT) ? " wait" : "",
|
||||
(flags & CHECKPOINT_CAUSE_XLOG) ? " wal" : "",
|
||||
@@ -6835,7 +6835,7 @@ LogCheckpointStart(int flags, bool restartpoint)
|
||||
(errmsg("checkpoint starting:%s%s%s%s%s%s%s%s",
|
||||
(flags & CHECKPOINT_IS_SHUTDOWN) ? " shutdown" : "",
|
||||
(flags & CHECKPOINT_END_OF_RECOVERY) ? " end-of-recovery" : "",
|
||||
(flags & CHECKPOINT_IMMEDIATE) ? " immediate" : "",
|
||||
(flags & CHECKPOINT_FAST) ? " fast" : "",
|
||||
(flags & CHECKPOINT_FORCE) ? " force" : "",
|
||||
(flags & CHECKPOINT_WAIT) ? " wait" : "",
|
||||
(flags & CHECKPOINT_CAUSE_XLOG) ? " wal" : "",
|
||||
@@ -7023,8 +7023,8 @@ update_checkpoint_display(int flags, bool restartpoint, bool reset)
|
||||
* flags is a bitwise OR of the following:
|
||||
* CHECKPOINT_IS_SHUTDOWN: checkpoint is for database shutdown.
|
||||
* CHECKPOINT_END_OF_RECOVERY: checkpoint is for end of WAL recovery.
|
||||
* CHECKPOINT_IMMEDIATE: finish the checkpoint ASAP,
|
||||
* ignoring checkpoint_completion_target parameter.
|
||||
* CHECKPOINT_FAST: finish the checkpoint ASAP, ignoring
|
||||
* checkpoint_completion_target parameter.
|
||||
* CHECKPOINT_FORCE: force a checkpoint even if no XLOG activity has occurred
|
||||
* since the last one (implied by CHECKPOINT_IS_SHUTDOWN or
|
||||
* CHECKPOINT_END_OF_RECOVERY).
|
||||
@@ -8929,9 +8929,8 @@ issue_xlog_fsync(int fd, XLogSegNo segno, TimeLineID tli)
|
||||
* backup state and tablespace map.
|
||||
*
|
||||
* Input parameters are "state" (the backup state), "fast" (if true, we do
|
||||
* the checkpoint in immediate mode to make it faster), and "tablespaces"
|
||||
* (if non-NULL, indicates a list of tablespaceinfo structs describing the
|
||||
* cluster's tablespaces.).
|
||||
* the checkpoint in fast mode), and "tablespaces" (if non-NULL, indicates a
|
||||
* list of tablespaceinfo structs describing the cluster's tablespaces.).
|
||||
*
|
||||
* The tablespace map contents are appended to passed-in parameter
|
||||
* tablespace_map and the caller is responsible for including it in the backup
|
||||
@@ -9059,11 +9058,11 @@ do_pg_backup_start(const char *backupidstr, bool fast, List **tablespaces,
|
||||
* during recovery means that checkpointer is running, we can use
|
||||
* RequestCheckpoint() to establish a restartpoint.
|
||||
*
|
||||
* We use CHECKPOINT_IMMEDIATE only if requested by user (via
|
||||
* passing fast = true). Otherwise this can take awhile.
|
||||
* We use CHECKPOINT_FAST only if requested by user (via passing
|
||||
* fast = true). Otherwise this can take awhile.
|
||||
*/
|
||||
RequestCheckpoint(CHECKPOINT_FORCE | CHECKPOINT_WAIT |
|
||||
(fast ? CHECKPOINT_IMMEDIATE : 0));
|
||||
(fast ? CHECKPOINT_FAST : 0));
|
||||
|
||||
/*
|
||||
* Now we need to fetch the checkpoint record location, and also
|
||||
|
Reference in New Issue
Block a user