Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-25 Thread Fujii Masao
On 2022/07/26 9:42, Kyotaro Horiguchi wrote: At Sun, 24 Jul 2022 22:40:16 -0400, Tom Lane wrote in Fujii Masao writes: On 2022/07/22 17:31, Kyotaro Horiguchi wrote: I believed that it is recommended to move to the style not having the outmost parens. That style has been introduced by e3a

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-25 Thread Kyotaro Horiguchi
At Sun, 24 Jul 2022 22:40:16 -0400, Tom Lane wrote in > Fujii Masao writes: > > On 2022/07/22 17:31, Kyotaro Horiguchi wrote: > >> I believed that it is recommended to move to the style not having the > >> outmost parens. That style has been introduced by e3a87b4991. > > > I read the commit lo

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-24 Thread Bharath Rupireddy
On Thu, Jul 21, 2022 at 11:24 AM Kyotaro Horiguchi wrote: > > > > May be unrelated, IIRC, for the errors like ereport(PANIC, > > > (errmsg("could not locate a valid checkpoint record"))); we wanted to > > > add a hint asking users to consider running pg_resetwal to fix the > > > issue. The error f

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-24 Thread Tom Lane
Fujii Masao writes: > On 2022/07/22 17:31, Kyotaro Horiguchi wrote: >> I believed that it is recommended to move to the style not having the >> outmost parens. That style has been introduced by e3a87b4991. > I read the commit log, but I'm not sure yet if it's really recommended to > remove extr

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-24 Thread Fujii Masao
On 2022/07/22 17:31, Kyotaro Horiguchi wrote: I believed that it is recommended to move to the style not having the outmost parens. That style has been introduced by e3a87b4991. I read the commit log, but I'm not sure yet if it's really recommended to remove extra parens even from the exis

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-22 Thread Kyotaro Horiguchi
At Fri, 22 Jul 2022 11:50:14 +0900, Fujii Masao wrote in > Sorry, I failed to understand your point. Could you clarify your > point? Wrote as a reply to Tom's message. > > By the way, > > this looks like a good chance to remove the (now) extra parens around > > errmsg() and friends. > > For ex

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-22 Thread Kyotaro Horiguchi
At Thu, 21 Jul 2022 23:10:04 -0400, Tom Lane wrote in > Fujii Masao writes: > > On 2022/07/21 14:54, Kyotaro Horiguchi wrote: > >> At Thu, 21 Jul 2022 11:45:23 +0900, Fujii Masao > >> wrote in > >>> - (errmsg("could not locate required checkpoint record"), > >>> + (errmsg("could not locate a v

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-21 Thread Tom Lane
Fujii Masao writes: > On 2022/07/21 14:54, Kyotaro Horiguchi wrote: >> At Thu, 21 Jul 2022 11:45:23 +0900, Fujii Masao >> wrote in >>> - (errmsg("could not locate required checkpoint record"), >>> + (errmsg("could not locate a valid checkpoint record in backup_label >>> file"), >> "in back

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-21 Thread Fujii Masao
On 2022/07/21 14:54, Kyotaro Horiguchi wrote: I agree to removing the two parameters. And agree to let ReadCheckpointRecord not conscious of the location source. Thanks for the review! At Thu, 21 Jul 2022 11:45:23 +0900, Fujii Masao wrote in Agreed. Attached is the updated version of th

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-20 Thread Kyotaro Horiguchi
I agree to removing the two parameters. And agree to let ReadCheckpointRecord not conscious of the location source. At Thu, 21 Jul 2022 11:45:23 +0900, Fujii Masao wrote in > Agreed. Attached is the updated version of the patch. > Thanks for the review! - (errmsg("could not locate requir

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-20 Thread Fujii Masao
On 2022/07/21 0:29, Bharath Rupireddy wrote: How about we transform the following messages into something like below? (errmsg("could not locate a valid checkpoint record"))); after ReadCheckpointRecord() for control file cases to "could not locate valid checkpoint record in control file" (errm

Re: Remove useless arguments in ReadCheckpointRecord().

2022-07-20 Thread Bharath Rupireddy
On Wed, Jul 20, 2022 at 8:21 PM Fujii Masao wrote: > > Hi, > > I'd like to propose to remove "whichChkpt" and "report" arguments in > ReadCheckpointRecord(). "report" is obviously useless because it's always > true, i.e., there are two callers of the function and they always specify > true as "