Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9f98704

Browse files
Clarify operation of online checkpoints.
Previous comments left, but were too obscurefor such an important aspect of the system.
1 parent53edb8d commit9f98704

File tree

1 file changed

+12
-0
lines changed
  • src/backend/access/transam

1 file changed

+12
-0
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6847,6 +6847,18 @@ LogCheckpointEnd(bool restartpoint)
68476847
* Note: flags contains other bits, of interest here only for logging purposes.
68486848
* In particular note that this routine is synchronous and does not pay
68496849
* attention to CHECKPOINT_WAIT.
6850+
*
6851+
* If !shutdown then we are writing an online checkpoint. This is a very special
6852+
* kind of operation and WAL record because the checkpoint action occurs over
6853+
* a period of time yet logically occurs at just a single LSN. The logical
6854+
* position of the WAL record (redo ptr) is the same or earlier than the
6855+
* physical position. When we replay WAL we locate the checkpoint via its
6856+
* physical position then read the redo ptr and actually start replay at the
6857+
* earlier logical position. Note that we don't write *anything* to WAL at
6858+
* the logical position, so that location could be any other kind of WAL record.
6859+
* All of this mechanism allows us to continue working while we checkpoint.
6860+
* As a result, timing of actions is critical here and be careful to note that
6861+
* this function will likely take minutes to execute on a busy system.
68506862
*/
68516863
void
68526864
CreateCheckPoint(intflags)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp