Thread: rename SnapBuild* macros in slot.c

rename SnapBuild* macros in slot.c

From
Bharath Rupireddy
Date:
Hi,

It seems like the same macro names for
SnapBuildOnDiskNotChecksummedSize and SnapBuildOnDiskChecksummedSize
are being used in slot.c and snapbuild.c. I think, in slot.c, we can
rename them to ReplicationSlotOnDiskNotChecksummedSize and
ReplicationSlotOnDiskChecksummedSize
similar to the other macros ReplicationSlotOnDiskConstantSize and
ReplicationSlotOnDiskV2Size.

Here's a tiny patch for the above change.

Regards,
Bharath Rupireddy.

Attachment

Re: rename SnapBuild* macros in slot.c

From
Amit Kapila
Date:
On Sat, Nov 20, 2021 at 7:43 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> It seems like the same macro names for
> SnapBuildOnDiskNotChecksummedSize and SnapBuildOnDiskChecksummedSize
> are being used in slot.c and snapbuild.c. I think, in slot.c, we can
> rename them to ReplicationSlotOnDiskNotChecksummedSize and
> ReplicationSlotOnDiskChecksummedSize
> similar to the other macros ReplicationSlotOnDiskConstantSize and
> ReplicationSlotOnDiskV2Size.
>

+1 for this change. This seems to be introduced by commit ec5896aed3
[1] and I think it is just a typo to name these macros starting with
SnapBuildOnDisk* unless I am missing something.


[1]
commit ec5896aed3c01da24c1f335f138817e9890d68b6
Author: Andres Freund <andres@anarazel.de>
Date:   Wed Nov 12 18:52:49 2014 +0100

    Fix several weaknesses in slot and logical replication on-disk
serialization.

-- 
With Regards,
Amit Kapila.



Re: rename SnapBuild* macros in slot.c

From
Alvaro Herrera
Date:
On 2021-Nov-22, Amit Kapila wrote:

> +1 for this change. This seems to be introduced by commit ec5896aed3
> [1] and I think it is just a typo to name these macros starting with
> SnapBuildOnDisk* unless I am missing something.

Yeah, it looks pretty weird.  +1 for the change on consistency grounds.

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/



Re: rename SnapBuild* macros in slot.c

From
Amit Kapila
Date:
On Mon, Nov 22, 2021 at 7:47 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2021-Nov-22, Amit Kapila wrote:
>
> > +1 for this change. This seems to be introduced by commit ec5896aed3
> > [1] and I think it is just a typo to name these macros starting with
> > SnapBuildOnDisk* unless I am missing something.
>
> Yeah, it looks pretty weird.  +1 for the change on consistency grounds.
>

Okay, I will push this tomorrow unless I see any objections.

-- 
With Regards,
Amit Kapila.



Re: rename SnapBuild* macros in slot.c

From
Amit Kapila
Date:
On Tue, Nov 23, 2021 at 8:12 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Mon, Nov 22, 2021 at 7:47 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> >
> > On 2021-Nov-22, Amit Kapila wrote:
> >
> > > +1 for this change. This seems to be introduced by commit ec5896aed3
> > > [1] and I think it is just a typo to name these macros starting with
> > > SnapBuildOnDisk* unless I am missing something.
> >
> > Yeah, it looks pretty weird.  +1 for the change on consistency grounds.
> >
>
> Okay, I will push this tomorrow unless I see any objections.
>

Pushed!

-- 
With Regards,
Amit Kapila.