Re: pg_receivewal - couple of improvements - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pg_receivewal - couple of improvements
Date
Msg-id YgCJtRFUAw4ke25m@paquier.xyz
Whole thread Raw
In response to Re: pg_receivewal - couple of improvements  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: pg_receivewal - couple of improvements
List pgsql-hackers
On Sun, Feb 06, 2022 at 01:01:41PM +0530, Bharath Rupireddy wrote:
> With the start position as an option, users can just provide the LSN
> from which they want to stream the WAL, in the above case, it can be
> from primary's latest checkpoint LSN.

This still strikes me as a dangerous thing to have, prone to errors
with a bunch of base backups wasted if one does a mistake as it would
be very easy to cause holes in the WAL stored, until one has to
redeploy from a base backup in urgency.  This kind of control is
provided by replication slots for new locations, and the current
archive location if anything is stored, so I would leave it at that.

On top of that, this kind of control is prone to more race conditions
with the backend, as a concurrent checkpoint could make the LSN you
are looking for irrelevant.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: [PATCH] Add min() and max() aggregate functions for xid8
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Add checkpoint and redo LSN to LogCheckpointEnd log message