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

Commit64e196b

Browse files
Fix bufmgr so CHECKPOINT_END_OF_RECOVERY behaves as a shutdown checkpoint.
Recovery code documents clearly that a shutdown checkpoint is executed atend of recovery - a shutdown checkpoint WAL record is written but the buffermanager had been altered to treat end of recovery as a normal checkpoint.This bug exacerbates the bufmgr relpersistence bug.Bug spotted by Andres Freund, patch by me.
1 parent3275426 commit64e196b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,9 +1206,9 @@ BufferSync(int flags)
12061206

12071207
/*
12081208
* Unless this is a shutdown checkpoint, we write only permanent, dirty
1209-
* buffers. But at shutdowntime, we write all dirty buffers.
1209+
* buffers. But at shutdownor end of recovery, we write all dirty buffers.
12101210
*/
1211-
if (!(flags&CHECKPOINT_IS_SHUTDOWN))
1211+
if (!((flags&CHECKPOINT_IS_SHUTDOWN)|| (flags&CHECKPOINT_END_OF_RECOVERY)))
12121212
mask |=BM_PERMANENT;
12131213

12141214
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp