Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive

Started by Bharath Rupireddyover 3 years ago4 messageshackers
Jump to latest
#1Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com

Hi,

Here's a small patch replacing the explicit setting of
XLogCtl->InstallXLogFileSegmentActive with the existing function
SetInstallXLogFileSegmentActive(), removes duplicate code and saves 4
LOC.

--
Bharath Rupireddy
RDS Open Source Databases: https://aws.amazon.com/rds/postgresql/

Attachments:

v1-0001-Use-SetInstallXLogFileSegmentActive.patchapplication/octet-stream; name=v1-0001-Use-SetInstallXLogFileSegmentActive.patchDownload+2-7
#2Nathan Bossart
nathandbossart@gmail.com
In reply to: Bharath Rupireddy (#1)
Re: Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive

On Thu, Aug 11, 2022 at 09:42:18PM +0530, Bharath Rupireddy wrote:

Here's a small patch replacing the explicit setting of
XLogCtl->InstallXLogFileSegmentActive with the existing function
SetInstallXLogFileSegmentActive(), removes duplicate code and saves 4
LOC.

LGTM

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

#3Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
In reply to: Nathan Bossart (#2)
Re: Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive

On Fri, Aug 12, 2022 at 4:17 AM Nathan Bossart <nathandbossart@gmail.com> wrote:

On Thu, Aug 11, 2022 at 09:42:18PM +0530, Bharath Rupireddy wrote:

Here's a small patch replacing the explicit setting of
XLogCtl->InstallXLogFileSegmentActive with the existing function
SetInstallXLogFileSegmentActive(), removes duplicate code and saves 4
LOC.

LGTM

Thanks for reviewing. I added it to the current commitfest to not lose
track of it - https://commitfest.postgresql.org/39/3815/

--
Bharath Rupireddy
RDS Open Source Databases: https://aws.amazon.com/rds/postgresql/

#4Michael Paquier
michael@paquier.xyz
In reply to: Bharath Rupireddy (#3)
Re: Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive

On Mon, Aug 15, 2022 at 11:33:00AM +0530, Bharath Rupireddy wrote:

Thanks for reviewing. I added it to the current commitfest to not lose
track of it - https://commitfest.postgresql.org/39/3815/

This reduces slightly the footprint of InstallXLogFileSegmentActive,
which is fine by me, so applied.
--
Michael