From: Andrus <kobruleht2@hot.ee>
To: Paul Förster <paul.foerster@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated
Date: Sun, 31 May 2020 23:56:05 +0300
Message-ID: <69FF4F48E6FE4A63A2EBD820C5B2B3A3@dell2> (raw)
In-Reply-To: <B7E0C7C6-865B-4632-B10A-11B2E468D40A@gmail.com>
References: <26EC9619620649D1B55C9C95811E4ADB@dell2>
<B7E0C7C6-865B-4632-B10A-11B2E468D40A@gmail.com>
Hi!
> On 31. May, 2020, at 21:47, Andrus <kobruleht2@hot.ee> wrote:
> replikaator@[unknown] ERROR: requested WAL segment 00000001000002CF000000E9 has already been removed
>the message says it all. You need to copy the WAL file 00000001000002CF000000E9 and newer to the replica's pg_wal directory because
>it has been removed >already on the master site.
>Obviously, you can only do that if the files have been archived.
wal files are not archieved.
>Otherwise, you'd have to fully reinitiate the replica.
I have tried to re-initiate replica serveral times in low-use time but this error occurs again.
>Replication will start again as soon as the requested WALs are copied over to the replica.
>Use a replication slot to avoid this situation. If you use a replication slot, the master will only remove WAL files which are not
>needed by any one replica.
If named replication slot is used commands like
vacuumdb --all --full
will cause main server crash due to disk space limit. pg_wal directory will occupy free disk space. After that main server stops.
I tried using wal_keep_segments =180
Will setting wal_keep_segments to higher value allw replication start after pg_basebackup ?
Andrus.
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: kobruleht2@hot.ee, paul.foerster@gmail.com
Subject: Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated
In-Reply-To: <69FF4F48E6FE4A63A2EBD820C5B2B3A3@dell2>
References: <26EC9619620649D1B55C9C95811E4ADB@dell2> <B7E0C7C6-865B-4632-B10A-11B2E468D40A@gmail.com> <69FF4F48E6FE4A63A2EBD820C5B2B3A3@dell2>
* 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