rename SnapBuild* macros in slot.c

Started by Bharath Rupireddyabout 5 years ago5 messageshackers
Jump to latest
#1Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com

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.

Attachments:

v1-0001-rename-SnapBuild-macros-in-slot.c.patchapplication/octet-stream; name=v1-0001-rename-SnapBuild-macros-in-slot.c.patchDownload+7-8
#2Amit Kapila
amit.kapila16@gmail.com
In reply to: Bharath Rupireddy (#1)
Re: rename SnapBuild* macros in slot.c

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]: commit ec5896aed3c01da24c1f335f138817e9890d68b6 Author: Andres Freund <andres@anarazel.de> Date: Wed Nov 12 18:52:49 2014 +0100
SnapBuildOnDisk* unless I am missing something.

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

#3Alvaro Herrera
alvherre@alvh.no-ip.org
In reply to: Amit Kapila (#2)
Re: rename SnapBuild* macros in slot.c

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/

#4Amit Kapila
amit.kapila16@gmail.com
In reply to: Alvaro Herrera (#3)
Re: rename SnapBuild* macros in slot.c

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.

#5Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#4)
Re: rename SnapBuild* macros in slot.c

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.