Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g4KzR-0005i5-Qt for pgsql-admin@arkaria.postgresql.org; Mon, 24 Sep 2018 07:09:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g4KzN-0001rb-Bj for pgsql-admin@arkaria.postgresql.org; Mon, 24 Sep 2018 07:09:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g4KzN-0001rU-3u for pgsql-admin@lists.postgresql.org; Mon, 24 Sep 2018 07:09:01 +0000 Received: from mx2a.mailbox.org ([2001:67c:2050:104:0:2:25:2] helo=mx2.mailbox.org) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g4KzK-0001y5-Sx for pgsql-admin@postgresql.org; Mon, 24 Sep 2018 07:09:00 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 8225B41967; Mon, 24 Sep 2018 09:08:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id MAQvzckDAx57; Mon, 24 Sep 2018 09:08:52 +0200 (CEST) Message-ID: <2779539bc6e5413b71064f92b44e2a7f6bdfcde0.camel@cybertec.at> Subject: Re: Archive clean up command in recovery.conf From: Laurenz Albe To: Prince Pathria , pgsql-admin@postgresql.org In-Reply-To: References: Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Date: Mon, 24 Sep 2018 08:22:04 +0200 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Prince Pathria wrote: > I have a doubt, assume that I have 3 psql10 nodes (n1, n2, n3) > and n1 is master ,n2+n3 are standbys. In n1 archive mode is on, > and wal_logs are going to volume which is shared with n2 and n3. > If archive_cleanup_command = 'pg_archivecleanup /path/to/nfs %r' > is enabled on both n2 and n3. > > Can a situation might arise that a wal segment required by n2 > is already cleaned up by n3? Yes, that pg_archivecleanup is a bad idea, because the faster standby might remove files that the slower one still needs. > If yes, then how to mitigate it? Use streaming replication and replication slots. Yours, Laurenz Albe