Re: corruption of WAL page header is never reported
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: nagata@sraoss.co.jp, ranier.vf@gmail.com, pgsql-hackers@postgresql.org
Date: 2021-09-02T12:52:00Z
Lists: pgsql-hackers
On 2021/09/02 16:26, Kyotaro Horiguchi wrote: > I believe errmsg_buf is an interface to emit error messages dedicated > to xlogreader that doesn't have an access to elog facility, and > xlogreader doesn't (or ought not to or expect to) suppose > non-xlogreader callback functions set the variable. In that sense I > don't think theoriginally proposed patch is proper for the reason that > the non-xlogreader callback function may set errmsg_buf. This is what > I meant by the word "modularity". > > For that reason I avoided in my second proposal to call > XLogReaderValidatePageHeader() at all while not in standby mode, > because calling the validator function while in non-standby mode > results in the non-xlogreader function return errmsg_buf. Of course > we can instead always consume errmsg_buf in the function but I don't > like to shadow the caller's task. Understood. Thanks for clarifying this! > Does that makes sense? Yes, I'm fine with your latest patch. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
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