Re: Move backup-related code to xlogbackup.c/.h

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Move backup-related code to xlogbackup.c/.h
Date: 2022-10-24 07:30:17
Message-ID: Y1Y/CTSSZfOsnjie@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-10-24 07:44:54 PGDOCS - Logical replication GUCs - added some xrefs
Previous Message Michael Paquier 2022-10-24 07:13:51 Re: Allow file inclusion in pg_hba and pg_ident files