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

Commit0902ece

Browse files
committed
Force zero_damaged_pages to be effectively ON during recovery from WAL,
since there is no need to worry about damaged pages when we are going tooverwrite them anyway from the WAL. Per recent discussion.
1 parent64e5a85 commit0902ece

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.147 2003/11/29 19:51:56 pgsql Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.148 2003/12/01 16:53:19 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -231,7 +231,13 @@ ReadBufferInternal(Relation reln, BlockNumber blockNum,
231231
if (status==SM_SUCCESS&&
232232
!PageHeaderIsValid((PageHeader)MAKE_PTR(bufHdr->data)))
233233
{
234-
if (zero_damaged_pages)
234+
/*
235+
* During WAL recovery, the first access to any data page should
236+
* overwrite the whole page from the WAL; so a clobbered page
237+
* header is not reason to fail. Hence, when InRecovery we may
238+
* always act as though zero_damaged_pages is ON.
239+
*/
240+
if (zero_damaged_pages||InRecovery)
235241
{
236242
ereport(WARNING,
237243
(errcode(ERRCODE_DATA_CORRUPTED),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp