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

From Andres Freund
Subject Re: Move backup-related code to xlogbackup.c/.h
Date
Msg-id 20221005232038.a3x6n2qop6demtzg@awork3.anarazel.de
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
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



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Move backup-related code to xlogbackup.c/.h
Next
From: David Rowley
Date:
Subject: Re: shadow variables - pg15 edition