OSDN Git Service

During WAL recovery, when reading a page that we intend to overwrite completely
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 May 2007 23:18:03 +0000 (23:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 May 2007 23:18:03 +0000 (23:18 +0000)
commit8c3cc86e7b688b0efe5ec6ce4f4342c2883b1db5
tree33cfc93810e9c15988c7dc26f7350a6b9d5d4c53
parent8ec943856a4e94637600fa7cad976281ca3f4071
During WAL recovery, when reading a page that we intend to overwrite completely
from the WAL data, don't bother to physically read it; just have bufmgr.c
return a zeroed-out buffer instead.  This speeds recovery significantly,
and also avoids unnecessary failures when a page-to-be-overwritten has corrupt
page headers on disk.  This replaces a former kluge that accomplished the
latter by pretending zero_damaged_pages was always ON during WAL recovery;
which was OK when the kluge was put in, but is unsafe when restoring a WAL
log that was written with full_page_writes off.

Heikki Linnakangas
src/backend/access/transam/xlogutils.c
src/backend/storage/buffer/bufmgr.c
src/include/storage/bufmgr.h