Re: [GENERAL] Backup strategy using 'wal_keep_segments' - Mailing list pgsql-general

From Michael Paquier
Subject Re: [GENERAL] Backup strategy using 'wal_keep_segments'
Date
Msg-id CAB7nPqQxufdSgHmP8BB+Stbqg9m-1cA4YpS1TTeT0PRFQjnA3Q@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Backup strategy using 'wal_keep_segments'  (Rhhh Lin <ruanlinehan@hotmail.com>)
Responses Re: [GENERAL] Backup strategy using 'wal_keep_segments'  (Rhhh Lin <ruanlinehan@hotmail.com>)
List pgsql-general
On Mon, Oct 23, 2017 at 5:57 AM, Rhhh Lin <ruanlinehan@hotmail.com> wrote:
> Is this approach feasible? Assuming obviously, we have sufficient disk space
> to facilitate 1000 WAL files etc.

You expose yourself to race conditions with such methods if a
checkpoint has the bad idea to recycle past segments that your logic
is copying. So I would advise to not do that. Instead of using the
archive command, you should also consider using pg_receivexlog
combined with a replication slot. This brings way more control with
the error handling.
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Rhhh Lin
Date:
Subject: [GENERAL] Backup strategy using 'wal_keep_segments'
Next
From: Michael Paquier
Date:
Subject: Re: [GENERAL] Postgres 9.6 fails to start on VMWare