Re: corruption of WAL page header is never reported
Yugo Nagata <nagata@sraoss.co.jp>
From: Yugo NAGATA <nagata@sraoss.co.jp>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2021-07-19T07:00:39Z
Lists: pgsql-hackers
On Mon, 19 Jul 2021 15:14:41 +0900 (JST) Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote: > Hello. > > At Sun, 18 Jul 2021 04:55:05 +0900, Yugo NAGATA <nagata@sraoss.co.jp> wrote in > > Hello, > > > > I found that any corruption of WAL page header found during recovery is never > > reported in log messages. If wal page header is broken, it is detected in > > XLogReaderValidatePageHeader called from XLogPageRead, but the error messages > > are always reset and never reported. > > Good catch! Currently recovery stops showing no reason if it is > stopped by page-header errors. > > > I attached a patch to fix it in this way. > > However, it is a kind of a roof-over-a-roof. What we should do is > just omitting the check in XLogPageRead while in standby mode. Your patch doesn't fix the issue that the error message is never reported in standby mode. When a WAL page header is broken, the standby would silently repeat retrying forever. I think we have to let users know the corruption of WAL page header even in standby mode, not? A corruption of WAL record header is always reported, by the way. (See that XLogReadRecord is calling ValidXLogRecordHeader.) Regards, Yugo Nagata -- Yugo NAGATA <nagata@sraoss.co.jp>
Commits
-
Make recovery report error message when invalid page header is found.
- 7b03d3a3ba45 12.17 landed
- 5dc093eacef1 13.13 landed
- 2f13e8d9ec28 14.10 landed
- 68601985e699 15.0 landed
-
Fix scenario where streaming standby gets stuck at a continuation record.
- 066871980183 11.0 cited