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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 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-05 23:20:38
Message-ID: 20221005232038.a3x6n2qop6demtzg@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-10-05 15:22:01 +0530, Bharath Rupireddy wrote:
> +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.

I'm doubtful it's a good idea to expose these to outside of xlog.c - they are
very low level, and it's very easy to break stuff by using them wrongly. IMO,
if that's necessary, the split isn't right.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-10-06 00:00:41 Re: shadow variables - pg15 edition
Previous Message Nathan Bossart 2022-10-05 22:52:24 Re: Move backup-related code to xlogbackup.c/.h