why doesn't call XLogCheckInvalidPages during primary crash recovery? - Mailing list pgsql-hackers

From 王伟(学弈)
Subject why doesn't call XLogCheckInvalidPages during primary crash recovery?
Date
Msg-id 646b4d3e-cacc-4012-8cb8-9cfa5037093b.rogers.ww@alibaba-inc.com
Whole thread Raw
List pgsql-hackers
Hi hackers,
Startup process will record not existed pages into hash table invalid_page_tab during replaying WAL.
And it would call XLogCheckInvalidPages after reaching consistent recovery state. Finally, it will
PANIC or WARNING based on parameter ignore_invalid_pages if where's any invalid pages.

Now I'm wondering why doesn't call XLogCheckInvalidPages during primary crash recovery?

When primary node crash recovery, the mini recovery point is InvalidXLogRecPtr, so it skips
consistent recovery state stage. Startup process get no chance to call XLogCheckInvalidPages
before exit. 

In my opinion, invalid pages found in hash table invalid_page_tab means there's something
inconsistent between WAL and data. But why primary node can ignore it? Can anyone help
to answer?

--
Best regards,
rogers.ww

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Optionally using a better backtrace library?
Next
From: David Rowley
Date:
Subject: Re: Todo: Teach planner to evaluate multiple windows in the optimal order