Re: Fixup the variable name to indicate the WAL record reservation status. - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Fixup the variable name to indicate the WAL record reservation status.
Date
Msg-id 20230915.101225.774365094189333859.horikyota.ntt@gmail.com
Whole thread Raw
In response to Fixup the variable name to indicate the WAL record reservation status.  (Krishnakumar R <kksrcv001@gmail.com>)
List pgsql-hackers
At Wed, 13 Sep 2023 23:48:30 -0700, Krishnakumar R <kksrcv001@gmail.com> wrote in 
> Please find a small patch to improve code readability by fixing up the
> variable name to indicate the WAL record reservation status. The
> insertion is done later in the code based on the reservation status.

IMHO... Although "reserved" might be pertinent at the point of
assignment, its applicability promptly diminishes in the subsequent
uses. When the variable is first assigned, we know the record will
insert some bytes and advance the LSN. In other words, the variable
suggests "to be inserted", and promptly thereafter, the variable
indicates that the record "has been inserted". Given this, "inserted"
seems to be a better fit than "reserved".

In short, I would keep the variable name as it is.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Have better wording for snapshot file reading failure
Next
From: Andres Freund
Date:
Subject: Re: Is it possible to change wal_level online