Re: Needing verification on instructions for streaming replication

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Dave Florek <dave(dot)a(dot)florek(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Needing verification on instructions for streaming replication
Date: 2017-09-11 18:38:44
Message-ID: CAMkU=1wBVhTERc7=vwdMiJBxkbCg9GTUCsRFo+_Xi0ZUb7XMhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 11, 2017 at 7:02 AM, Dave Florek <dave(dot)a(dot)florek(at)gmail(dot)com>
wrote:

> Hi,
>
> I'm trying to setup streaming replication on a cluster of postgresql
> databases and I followed the instructions outlined here (
> https://wiki.postgresql.org/wiki/Streaming_Replication) but I'm stuck on
> the archive and restore commands. In reading the comments from the archive
> command, WAL archiving needs a shared directory between the primary and
> standby machines in order to replicate. Is this something actually
> required? If so, does postgresql have any recommendations on where this
> shared directory ought to be hosted?
>

You can use streaming replication without any WAL archive at all. If the
only reason you want a WAL archive is so that the standby can fall behind
the primary without losing the ability to catch back up again, then you can
use a replication slot to make the primary hold onto WAL files until the
standby is done with them. That is going to be simpler than using a WAL
archive, provided the master has enough room to keep them around should the
standby fail for a while.

If you want a WAL archive for other reasons, then the choice of how to host
it would depend on those reasons.

Cheers,

Jeff

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message kbrannen 2017-09-11 18:38:49 Re: pg_restore error -- missing pg table
Previous Message Tom Lane 2017-09-11 17:43:16 Re: pg_restore error -- missing pg table