why doesn't call XLogCheckInvalidPages during primary crash recovery?

From: 王伟(学弈) <rogers(dot)ww(at)alibaba-inc(dot)com>
To: "pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: why doesn't call XLogCheckInvalidPages during primary crash recovery?
Date: 2023-07-03 10:11:51
Message-ID: 646b4d3e-cacc-4012-8cb8-9cfa5037093b.rogers.ww@alibaba-inc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2023-07-03 10:14:50 Re: Todo: Teach planner to evaluate multiple windows in the optimal order
Previous Message Alvaro Herrera 2023-07-03 09:58:25 Re: Optionally using a better backtrace library?