From: Stephen Frost <sfrost@snowman.net>
To: Phil Endecott <spam_from_pgsql_lists@chezphil.org>
Cc: pgsql-general@lists.postgresql.org
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Subject: Re: Replication failure, slave requesting old segments
Date: Mon, 13 Aug 2018 08:39:15 -0400
Message-ID: <20180813123915.GD3326@tamriel.snowman.net> (raw)
In-Reply-To: <1534162092902@dmwebmail.dmwebmail.chezphil.org>
References: <31ba3812-6a0a-4639-5386-e804e59bc322@aklaver.com>
<1534162092902@dmwebmail.dmwebmail.chezphil.org>
Greetings,
* Phil Endecott (spam_from_pgsql_lists@chezphil.org) wrote:
> Adrian Klaver wrote:
> >On 08/12/2018 02:56 PM, Phil Endecott wrote:
> >>Anyway. Do others agree that my issue was the result of
> >>wal_keep_segments=0 ?
> >
> >Only as a sub-issue of the slave losing contact with the master. The basic
> >problem is maintaining two separate operations, archiving and streaming,
> >in sync. If either or some combination of both lose synchronization then
> >it is anyone's guess on what is appropriate for wal_keep_segments.
Uh, no, having an archive_command and a restore_command configures
exactly should remove the need to worry about what wal_keep_segments is
set to because anything not on the primary really should be available
through what's been archived and PG shouldn't have any trouble figuring
that out and working with it.
If all you've got is streaming replication then, sure, you have no idea
what to set wal_keep_segments to because the replica could be offline
for an indeterminate amount of time, but as long as you're keeping track
of all the WAL through archive_command, that shouldn't be an issue.
> Really? I thought the intention was that the system should be
> able to recover reliably when the slave reconnects after a
> period of downtime, subject only to there being sufficient
> network/CPU/disk bandwidth etc. for it to eventually catch up.
Yes, that's correct, the replica should always be able to catch back up
presuming there's no gaps in the WAL between when the replica failed and
where the primary is at.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: sfrost@snowman.net, spam_from_pgsql_lists@chezphil.org, adrian.klaver@aklaver.com
Subject: Re: Replication failure, slave requesting old segments
In-Reply-To: <20180813123915.GD3326@tamriel.snowman.net>
References: <31ba3812-6a0a-4639-5386-e804e59bc322@aklaver.com> <1534162092902@dmwebmail.dmwebmail.chezphil.org> <20180813123915.GD3326@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox