Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfV0M-00075N-Qf for pgsql-general@arkaria.postgresql.org; Sun, 31 May 2020 20:56:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jfV0K-0006kA-Gr for pgsql-general@arkaria.postgresql.org; Sun, 31 May 2020 20:56:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfV0K-0006jl-8m for pgsql-general@lists.postgresql.org; Sun, 31 May 2020 20:56:24 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfV0G-0003ZO-72 for pgsql-general@postgresql.org; Sun, 31 May 2020 20:56:23 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 606E41A80; Sun, 31 May 2020 23:56:16 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at vm-hot-relay10.estpak.ee Received: from portal-smtp-out.hot.ee ([127.0.0.1]) by localhost (vm-hot-relay10.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yAWmqdP5ob44; Sun, 31 May 2020 23:56:14 +0300 (EEST) Received: from mail.hot.ee (hot-relayhost2.estpak.ee [213.180.2.80]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 317151AC6; Sun, 31 May 2020 23:56:14 +0300 (EEST) Received: from dell2 (66-63-196-88.sta.estpak.ee [88.196.63.66]) (Authenticated sender: kobruleht2) by HOT-Relayhost2.estpak.ee (Postfix) with ESMTPSA id 49ZrF86Jxlz2K2; Sun, 31 May 2020 23:56:11 +0300 (EEST) Message-ID: <69FF4F48E6FE4A63A2EBD820C5B2B3A3@dell2> From: "Andrus" To: =?iso-8859-1?Q?Paul_F=F6rster?= Cc: "pgsql-general" References: <26EC9619620649D1B55C9C95811E4ADB@dell2> In-Reply-To: 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 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi! > On 31. May, 2020, at 21:47, Andrus 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.