Re: Concurrency issue in pg_rewind - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Concurrency issue in pg_rewind
Date
Msg-id 20200918061011.GC2772@paquier.xyz
Whole thread Raw
In response to Re: Concurrency issue in pg_rewind  (Oleksandr Shulgin <oleksandr.shulgin@zalando.de>)
Responses Re: Concurrency issue in pg_rewind
Re: Concurrency issue in pg_rewind
List pgsql-hackers
On Thu, Sep 17, 2020 at 10:20:16AM +0200, Oleksandr Shulgin wrote:
> Ouch.  I think pg_rewind shouldn't try to remove any random files in pg_wal
> that it doesn't know about.
> What if the administrator made a backup of some WAL segments there?

IMO, this would be a rather bad strategy anyway, so just don't do
that, because that could also mean that this is on the same partition
as pg_wal/ which would crash the server if the partition has the idea
to get full even if max_wal_size is set correctly.  If you think about
that, this is rather similar to putting tablespaces in your root data
folder: it may look fancy, but you just make the task of the backend
more complicated.  Note that this practice is not wise when Postgres
decides to apply actions that loop across the entire tree, just to
name two of them: the full fsync of PGDATA at the beginning of crash
recovery or just a base backup.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Command statistics system (cmdstats)
Next
From: Amit Kapila
Date:
Subject: Re: logical/relation.c header description