pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Mariya Rampurawala <Mariya.Rampurawala@veritas.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: [EXTERNAL] Re: PostgreSQL-12 replication failover, pg_rewind fails
Date: Tue, 12 May 2020 17:29:50 +0200
Message-ID: <faea10fbbfaa619467c31df9eefab755b9b42e80.camel@cybertec.at> (raw)
In-Reply-To: <8BD51BB9-8695-4F10-8E9A-144D3F97059C@veritas.com>
References: <2775DB08-A4FB-44EE-9A3B-81ABB4CB4F7F@veritas.com>
	<76BE6093-8449-4D52-BC16-34B69B02CE2D@veritas.com>
	<20200512.174507.1640068515388747886.horikyota.ntt@gmail.com>
	<8BD51BB9-8695-4F10-8E9A-144D3F97059C@veritas.com>

On Tue, 2020-05-12 at 09:40 +0000, Mariya Rampurawala wrote:
> > but if the target cluster ran for a long time after the divergence,
> > the old WAL files might no longer be present. In that case, they can
> > be manually copied from the WAL archive to the pg_wal directory, or
> > fetched on startup by configuring primary_conninfo or restore_command.
> 
> I hit this issue every time I follow the aforementioned steps, manually as well as with scripts.
> How long is "long time after divergence"? Is there a way I can make some
> configuration changes so that I don’t hit this issue?
> Is there anything I must change in my restore command?

What you can do is to use a higher value for "wal_keep_segments".
Then PostgreSQL will keep around that number of old WAL segments,
which increases the chance for "pg_rewind" to succeed.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (8+ messages)  latest in thread

Message-ID: <faea10fbbfaa619467c31df9eefab755b9b42e80.camel@cybertec.at>
Permalink:  ../faea10fbbfaa619467c31df9eefab755b9b42e80.camel@cybertec.at/
Also on:    postgresql.org/message-id/faea10fbbfaa619467c31df9eefab755b9b42e80.camel@cybertec.at

 · 

reply

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: laurenz.albe@cybertec.at, Mariya.Rampurawala@veritas.com, horikyota.ntt@gmail.com
  Subject: Re: [EXTERNAL] Re: PostgreSQL-12 replication failover, pg_rewind fails
  In-Reply-To: <faea10fbbfaa619467c31df9eefab755b9b42e80.camel@cybertec.at>
  References: <2775DB08-A4FB-44EE-9A3B-81ABB4CB4F7F@veritas.com> <76BE6093-8449-4D52-BC16-34B69B02CE2D@veritas.com> <20200512.174507.1640068515388747886.horikyota.ntt@gmail.com> <8BD51BB9-8695-4F10-8E9A-144D3F97059C@veritas.com> <faea10fbbfaa619467c31df9eefab755b9b42e80.camel@cybertec.at>

* 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