Re: Streaming replication document

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Streaming replication document
Date: 2010-12-04 07:53:49
Message-ID: 4CF9F38D.9020104@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04.12.2010 04:18, Tatsuo Ishii wrote:
> There is a description about streaming replication in the doc:
> ----------------------------------------------------------
> 25.2.5. Streaming Replication
>
> :
> :
> If you set up a WAL archive that's accessible from the
> standby, wal_keep_segments is not required as the standby can always
> use the archive to catch up.
> ----------------------------------------------------------
>
> I think this description is somewhat inadequate. Since recovery using
> WAL archive is file based, it may cause long replication delay. I
> think even if WAL archive is set up, we should set wal_keep_segments
> to proper value, not 0. Recovery from WAL archive should be the last
> resort, shouldn't be?

If your standby falls behind that much, catching up is going to take a
while anyway. The master always keeps 2-3 * checkpoint_segments WAL
segments around anyway even if wal_keep_segments is 0.

Depending on the archive, it might well be faster to catch up using the
archive, instead of streaming from master.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jesper@Krogh.cc 2010-12-04 08:22:00 Re: Crash safe visibility map vs hint bits
Previous Message Heikki Linnakangas 2010-12-04 07:48:25 Re: Crash safe visibility map vs hint bits