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 1jLNbo-0002CY-8Y for pgsql-general@arkaria.postgresql.org; Mon, 06 Apr 2020 08:59:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLNbH-00083A-NY for pgsql-general@arkaria.postgresql.org; Mon, 06 Apr 2020 08:59:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLNbH-00081B-FH for pgsql-general@lists.postgresql.org; Mon, 06 Apr 2020 08:59:23 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLNbD-0007fD-SO for pgsql-general@postgresql.org; Mon, 06 Apr 2020 08:59:23 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 484901CF6; Mon, 6 Apr 2020 11:59:19 +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 JL9sHVfdGgx7; Mon, 6 Apr 2020 11:59:17 +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 0F7591CB5; Mon, 6 Apr 2020 11:59:17 +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 48wkxH6rgRz2p4; Mon, 6 Apr 2020 11:59:14 +0300 (EEST) Message-ID: <66DF84156F9442448FF8E8CF575FFE54@dell2> From: "Andrus" To: "Michael Paquier" Cc: "pgsql-general" References: <5E2C91B46CEF42078CC7BEE1EDC10F0E@dell2> <20200406082841.GB523433@paquier.xyz> In-Reply-To: <20200406082841.GB523433@paquier.xyz> Subject: Re: How to prevent master server crash if hot standby stops Date: Mon, 6 Apr 2020 11:59: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! Thank you. >When you use replication slots, it is very important to put in place a >monitoring solution to check if too much WAL is retained, and note >that there is nothing able to do that natively in core Postgres. >There are however multiple ways to solve this problem, like a >background worker (for the slot monitoring as well as optionally >killing and/or dropping), a simple cron job or even check_postgres. Where to find some sample how to implement this ? I read from docs that slot cannot dropped if it is in use. How to stop replication in this case. Andrus.