Re: [GENERAL] Shared WAL archive between master and standby: WALs notalways identical - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Shared WAL archive between master and standby: WALs notalways identical
Date
Msg-id CAKFQuwbTO7A_UA_hKx7SqzoGYhBvEJpiw+qrvS4eTpups1P2dA@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Shared WAL archive between master and standby: WALs notalways identical  (Sasa Vilic <sasavilic@gmail.com>)
List pgsql-general
On Mon, Feb 27, 2017 at 7:32 PM, Sasa Vilic <sasavilic@gmail.com> wrote:

My general idea is to have synchronous hot standby and asynchronous shared wal archive. If that were possible I could actually switch back and forth between master and slave without interrupting wal stream and with very short downtime. This also makes PostgreSQL upgrade very easy. Alternative to this is to have separate backup for master and slave, but this has other disadvantages:

* I need double disk space for backup if I am going to archive WALs from standby and master at the same time, or
* I could only archive WALs from current master, but that would require performing base backup immediately after failover. Otherwise archived WALs are useless. 


I became a bit skeptical when I re​ad:

"To get a complete series of WAL files in the archive, you must ensure that all WAL is archived, before it reaches the standby. This is inherently true with file-based log shipping, as the standby can only restore files that are found in the archive, but not if streaming replication is enabled."

given the lack of any hint as to how one would accomplish "a complete series of WAL files in the archive" in streaming replication mode...

Maybe I'm just missing something here - but it does seem like you don't get to have your cake and eat it...

Dave

pgsql-general by date:

Previous
From: Sasa Vilic
Date:
Subject: Re: [GENERAL] Shared WAL archive between master and standby: WALs notalways identical
Next
From: dhanuj hippie
Date:
Subject: [GENERAL] pg_xlog keeps growing