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?

Search Discussions

  • Tom Lane at Apr 12, 2007 at 8:24 pm

    "Jacky Leng" <lengjianquan@163.com> writes:
    Then if we come to the path "log_invalid_page", can I say there must be sth
    wrong, and we should PANIC?
    No; you forgot about full_page_writes = off.

    regards, tom lane

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedApr 12, '07 at 10:25a
activeApr 12, '07 at 8:24p
posts2
users2
websitepostgresql.org...
irc#postgresql

2 users in discussion

Jacky Leng: 1 post Tom Lane: 1 post

People

Translate

site design / logo © 2021 Grokbase