Do we still need "log_invalid_page"?

From: "Jacky Leng" <lengjianquan(at)163(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Do we still need "log_invalid_page"?
Date: 2007-04-12 10:20:36
Message-ID: evl1e9$tan$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

As the README for xlog says: There're two kinds of WAL records:
* WAL record that contains enough information to re-generate the entire
contents of a page;

during recovery of these records, blocks are read with:
buffer = XLogReadBuffer(reln, blkno, true);

so it can be sure that the block will be read successfully, i.e. buffer
won't be InvalidBuffer

* WAL record provides only enough information to incrementally update the
page;

As all blocks related to these xlog records will be backed up in the xlog
during the first write after checkpoint, and RestoreBkpBlocks will also read
it in with :
buffer = XLogReadBuffer(reln, blkno, true);

so it also can be sure that these blocks will be read successfully: because
the fisrt read of it must be in RestoreBkpBlocks, which will reconstruct the
block validly, and none problems in later read.

Then if we come to the path "log_invalid_page", can I say there must be sth
wrong, and we should PANIC?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ITAGAKI Takahiro 2007-04-12 10:27:37 Re: autovacuum multiworkers, patch 5
Previous Message Magnus Hagander 2007-04-12 10:14:43 Re: Vista/IPv6