Re: Move backup-related code to xlogbackup.c/.h - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: Move backup-related code to xlogbackup.c/.h
Date
Msg-id CALj2ACXyFA++Us2Jpko9CaLDuLLWs+KOSZKAD+SLOvMzgKcp-A@mail.gmail.com
Whole thread Raw
In response to Re: Move backup-related code to xlogbackup.c/.h  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Move backup-related code to xlogbackup.c/.h
Re: Move backup-related code to xlogbackup.c/.h
List pgsql-hackers
On Wed, Oct 5, 2022 at 1:20 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Tue, Oct 04, 2022 at 03:54:20PM -0700, Nathan Bossart wrote:
> > I would suggest moving this to a separate prerequisite patch that can be
> > reviewed independently from the patches that simply move code to a
> > different file.

I added the new functions in 0001 patch for ease of review.

> And FWIW, the SQL interfaces for pg_backup_start() and
> pg_backup_stop() could stay in xlogfuncs.c.  This has the advantage to
> centralize in the same file all the SQL-function-specific checks.

Agreed.

+extern void WALInsertLockAcquire(void);
+extern void WALInsertLockAcquireExclusive(void);
+extern void WALInsertLockRelease(void);
+extern void WALInsertLockUpdateInsertingAt(XLogRecPtr insertingAt);

Note that I had moved all WAL insert lock related functions to xlog.h
despite xlogbackup.c using 2 of them. This is done to keep all the
functions together.

Please review the attached v2 patch set.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment

pgsql-hackers by date:

Previous
From: Ibrar Ahmed
Date:
Subject: Re: [Commitfest 2022-09] Date is Over.
Next
From: Julien Rouhaud
Date:
Subject: Re: [Commitfest 2022-09] Date is Over.