Re: BUG #15638: pg_basebackup with --wal-method=stream incorrectlygenerates WAL segment created during backup - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #15638: pg_basebackup with --wal-method=stream incorrectlygenerates WAL segment created during backup
Date
Msg-id 20190221045603.GM15532@paquier.xyz
Whole thread Raw
In response to Re: BUG #15638: pg_basebackup with --wal-method=stream incorrectlygenerates WAL segment created during backup  (Andre Piwoni <apiwoni@webmd.net>)
List pgsql-bugs
On Wed, Feb 20, 2019 at 09:58:12AM -0800, Andre Piwoni wrote:
> Also, what do you mean that my archive command is not safe? It is straight
> from PostrgreSQL docs and other resources:
> https://www.postgresql.org/docs/10/continuous-archiving.html
> https://www.opsdash.com/blog/postgresql-wal-archiving-backup.html

The docs are not the best thing on this side...  One immediate problem
one could note is that cp does not flush the segment.  So if your host
crashes before the OS flushes the copied data then the WAL segment
data is lost.  The flush needs to happen before the archive command
returns its status to the server.

> It seems you agree that segment created during pg_basebackup with stream
> mode, which is not marked with .done extension, would be attempted to be
> archived again. I also understand stream method during backup is default so
> changing this behavior may have an impact. If there's any free solution you
> could recommend for backup strategy please let me know.

pgBackRest and repmgr are tools mentioned on the lists.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name
Next
From: "Hans Buschmann"
Date:
Subject: AW: BUG #15641: Autoprewarm worker fails to start on Windows with huge pages in use Old PostgreSQL community/pgsql-bugs x