Thread: GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

From
Peter Geoghegan
Date:
Why is GlobalVisIsRemovableFullXid() not named
GlobalVisCheckRemovableFullXid() instead? ISTM that that name makes
much more sense, since it is what I'd expect for a function that is
the "Full XID equivalent" of GlobalVisCheckRemovableXid().

Note also that GlobalVisIsRemovableFullXid() is the only symbol name
matching "GlobalVisIsRemovable*".

Have I missed something?

-- 
Peter Geoghegan



Re: GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

From
Andres Freund
Date:
Hi,

On 2021-02-06 12:27:30 -0800, Peter Geoghegan wrote:
> Why is GlobalVisIsRemovableFullXid() not named
> GlobalVisCheckRemovableFullXid() instead? ISTM that that name makes
> much more sense, since it is what I'd expect for a function that is
> the "Full XID equivalent" of GlobalVisCheckRemovableXid().
> 
> Note also that GlobalVisIsRemovableFullXid() is the only symbol name
> matching "GlobalVisIsRemovable*".

Looks like a mistake on my part... Probably a rename regex that somehow
went wrong - I went back and forth on those names way too many
times. Want me to push the fix?

Greetings,

Andres Freund



Re: GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

From
Peter Geoghegan
Date:
On Sat, Feb 6, 2021 at 7:40 PM Andres Freund <andres@anarazel.de> wrote:
> Looks like a mistake on my part... Probably a rename regex that somehow
> went wrong - I went back and forth on those names way too many
> times. Want me to push the fix?

Yes, please do. I could do it myself, but better that you do it
yourself, just in case.

-- 
Peter Geoghegan



Re: GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

From
Peter Geoghegan
Date:
On Sat, Feb 6, 2021 at 7:41 PM Peter Geoghegan <pg@bowt.ie> wrote:
> Yes, please do. I could do it myself, but better that you do it
> yourself, just in case.

I went ahead and fixed it myself.

Thanks
-- 
Peter Geoghegan



Re: GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

From
Peter Geoghegan
Date:
On Sat, Feb 6, 2021 at 7:40 PM Andres Freund <andres@anarazel.de> wrote:
> Looks like a mistake on my part... Probably a rename regex that somehow
> went wrong - I went back and forth on those names way too many
> times. Want me to push the fix?

Spotted another one: Shouldn't ReadNextFullTransactionId() actually be
called ReadNewFullTransactionId()? Actually, the inverse approach
looks like it produces fewer inconsistencies: you could instead rename
ReadNewTransactionId() to ReadNextTransactionId().

-- 
Peter Geoghegan



Re: GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

From
Thomas Munro
Date:
On Mon, Feb 15, 2021 at 10:02 AM Peter Geoghegan <pg@bowt.ie> wrote:
> On Sat, Feb 6, 2021 at 7:40 PM Andres Freund <andres@anarazel.de> wrote:
> > Looks like a mistake on my part... Probably a rename regex that somehow
> > went wrong - I went back and forth on those names way too many
> > times. Want me to push the fix?
>
> Spotted another one: Shouldn't ReadNextFullTransactionId() actually be
> called ReadNewFullTransactionId()? Actually, the inverse approach
> looks like it produces fewer inconsistencies: you could instead rename
> ReadNewTransactionId() to ReadNextTransactionId().

I prefer "next", because that's in the name of the variable it reads,
and the variable name seemed to me to have a more obvious meaning.
That's why I went for that name in commit 2fc7af5e966.  I do agree
that it's slightly strange that the 32 and 64 bit versions differ
here.  I'd vote for renaming the 32 bit version to match...



Re: GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

From
Peter Geoghegan
Date:
On Sun, Feb 14, 2021 at 2:08 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> I prefer "next", because that's in the name of the variable it reads,
> and the variable name seemed to me to have a more obvious meaning.
> That's why I went for that name in commit 2fc7af5e966.  I do agree
> that it's slightly strange that the 32 and 64 bit versions differ
> here.  I'd vote for renaming the 32 bit version to match...

I was just going to say the same thing myself.

Please do the honors if you have time...

-- 
Peter Geoghegan



Re: GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

From
Thomas Munro
Date:
On Mon, Feb 15, 2021 at 11:33 AM Peter Geoghegan <pg@bowt.ie> wrote:
> On Sun, Feb 14, 2021 at 2:08 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> > I prefer "next", because that's in the name of the variable it reads,
> > and the variable name seemed to me to have a more obvious meaning.
> > That's why I went for that name in commit 2fc7af5e966.  I do agree
> > that it's slightly strange that the 32 and 64 bit versions differ
> > here.  I'd vote for renaming the 32 bit version to match...
>
> I was just going to say the same thing myself.
>
> Please do the honors if you have time...

Done.



Re: GlobalVisIsRemovableFullXid() vs GlobalVisCheckRemovableXid()

From
Peter Geoghegan
Date:
On Sun, Feb 14, 2021 at 4:21 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> Done.

Thanks.

-- 
Peter Geoghegan