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

From Michael Paquier
Subject Re: Move backup-related code to xlogbackup.c/.h
Date
Msg-id Y1Y/CTSSZfOsnjie@paquier.xyz
Whole thread Raw
In response to Re: Move backup-related code to xlogbackup.c/.h  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Move backup-related code to xlogbackup.c/.h  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
On Wed, Oct 19, 2022 at 09:07:04PM +0530, Bharath Rupireddy wrote:
> XLogBackupResetRunning() seemed better. +1 for above function names.

I see what you are doing here.  XLogCtl would still live in xlog.c,
but we want to have functions that are able to manipulate some of its
fields.  I am not sure to like that much because it introduces a
circling dependency between xlog.c and xlogbackup.c.  As of HEAD,
xlog.c calls build_backup_content() from xlogbackup.c, which is fine
as xlog.c is kind of a central piece that feeds on the insert and
recovery pieces.  However your patch makes some code paths of
xlogbackup.c call routines from xlog.c, and I don't think that we
should do that.

> I'm okay either way.
>
> Please see the attached v8 patch set.

Among all that, CleanupBackupHistory() is different, still it has a
dependency with some of the archiving pieces..
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Allow file inclusion in pg_hba and pg_ident files
Next
From: Peter Smith
Date:
Subject: PGDOCS - Logical replication GUCs - added some xrefs