From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | pashkin(dot)elfe(at)gmail(dot)com |
Cc: | michael(at)paquier(dot)xyz, bossartn(at)amazon(dot)com, david(at)pgmasters(dot)net, peter(dot)eisentraut(at)2ndquadrant(dot)com, andres(at)anarazel(dot)de, pgsql-hackers(at)lists(dot)postgresql(dot)org, jtc331(at)gmail(dot)com, robertmhaas(at)gmail(dot)com |
Subject: | Re: Make mesage at end-of-recovery less scary. |
Date: | 2022-02-01 02:58:01 |
Message-ID: | 20220201.115801.132716949470613216.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi, Pavel.
At Mon, 31 Jan 2022 15:17:09 +0400, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> wrote in
> I don't quite understand a meaning of a comment:
> /* it is completely zeroed, call it a day */
While rethinking about this comment, It came to my mind that
XLogReaderValidatePageHeader is doing whole-page check. There is no
clear reason for not doing at least the same check here.
ValidXLogRecordHeader is changed to check all bytes in the rest of the
page, instead of just the record header.
While working on that, I noticed another end-of-WAL case, unexpected
pageaddr. I think we can assume it safe when the pageaddr is smaller
than expected (or we have no choice than assuming
so). XLogReaderValidatePageHeader is changed that way. But I'm not
sure others regard it as a form of safe end-of-WAL.
> Please also run pgindent on your code.
Hmm. I'm not sure we need to do that at this stage. pgindent makes
changes on the whole file involving unrelated part from this patch.
Anyway I did that then removed irrelevant edits.
pgindent makes a seemingly not-great suggestion.
+ char *pe =
+ (char *) record + XLOG_BLCKSZ - (RecPtr & (XLOG_BLCKSZ - 1));
I'm not sure this is intended but I split the line into two lines to
define and assign.
> Otherwise the new patch seems ok.
Thanks!
This version 10 is changed in the following points.
- Rewrited the comment in ValidXLogRecordHeader.
- ValidXLogRecordHeader
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
v10-0001-Make-End-Of-Recovery-error-less-scary.patch | text/x-patch | 15.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2022-02-01 02:58:55 | Re: Testing autovacuum wraparound (including failsafe) |
Previous Message | Amit Kapila | 2022-02-01 02:57:36 | Re: row filtering for logical replication |