Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive

Lists: pgsql-hackers
From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive
Date: 2022-08-11 16:12:18
Message-ID: CALj2ACVhkf-bC5CX-=6iBUfkO5GqmBntQH+m=HpY0iQ=-g1pRg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

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/

Attachment Content-Type Size
v1-0001-Use-SetInstallXLogFileSegmentActive.patch application/octet-stream 1.4 KB

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive
Date: 2022-08-11 22:47:00
Message-ID: 20220811224700.GA1657991@nathanxps13
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

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


From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive
Date: 2022-08-15 06:03:00
Message-ID: CALj2ACWB4zNKmJ=aHPDYs3YO1Ouu8+6e2OEpJpw-m-AZMAsyRw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Aug 12, 2022 at 4:17 AM Nathan Bossart <nathandbossart(at)gmail(dot)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/


From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive
Date: 2022-08-17 06:30:44
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

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