Re: wal receiver process always start after startup process recovering all WALs and need new WAL?

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Jov <amutu(at)amutu(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: wal receiver process always start after startup process recovering all WALs and need new WAL?
Date: 2015-12-16 00:59:00
Message-ID: 5670B754.6070202@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/15/15 2:49 AM, Jov wrote:
> I think this behavior for recovery_min_apply_delay is not good,because
> if the receiver do not fetch the wal for a long time(in these cases it
> must replay 3d's wal before wal receiver start),the master will delete
> the wal,and the standby will need be re do.

AFAIK, if you use a replication slot (new in 9.4) that won't happen,
because the master will know that the replica still hasn't applied the data.

If you don't use replication slots then you need to set
wal_keep_segments large enough on the master so that it doesn't delete
segments that are needed. Or configure WAL archiving and let the replica
replay from the archive.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message George Neuner 2015-12-16 02:23:55 Re: Permissions, "soft read failure" - wishful thinking?
Previous Message Jim Nasby 2015-12-16 00:52:44 Re: How to get the size of JSONB in bytes?