Re: Make mesage at end-of-recovery less scary.

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: alvherre(at)alvh(dot)no-ip(dot)org
Cc: pryzby(at)telsasoft(dot)com, jchampion(at)timescale(dot)com, andres(at)anarazel(dot)de, ashu(dot)coek88(at)gmail(dot)com, pashkin(dot)elfe(at)gmail(dot)com, michael(at)paquier(dot)xyz, bossartn(at)amazon(dot)com, david(at)pgmasters(dot)net, peter(dot)eisentraut(at)2ndquadrant(dot)com, 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: 2023-02-07 07:07:03
Message-ID: 20230207.160703.227873941157907961.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks!

At Fri, 3 Feb 2023 15:16:02 +0100, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote in
> So this patch is now failing because it applies new tests to
> 011_crash_recovery.pl, which was removed recently. Can you please move
> them elsewhere?

I don't find an appropriate file to move to. In the end I created a
new file with the name 034_recovery.pl. I added a test for standbys,
too. (which is the first objective of this patch.)

> I think the comment for ValidXLogRecordLength should explain what the
> return value is.

Agreed.

/*
* Validate record length of an XLOG record header.
*
* This is substantially a part of ValidXLogRecordHeader. But XLogReadRecord
* needs this separate from the function in case of a partial record header.
+ *
+ * Returns true if the xl_tot_len header field has a seemingly valid value,
+ * which means the caller can proceed reading to the following part of the
+ * record.
*/
static bool
ValidXLogRecordLength(XLogReaderState *state, XLogRecPtr RecPtr,

I added a similar description to ValidXLogRecordHeader.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
v24-0001-Make-End-Of-Recovery-error-less-scary.patch text/x-patch 20.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-02-07 07:09:57 Re: Remove some useless casts to (void *)
Previous Message Tom Lane 2023-02-07 06:12:51 Re: A problem in deconstruct_distribute_oj_quals