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 1mWHGI-0005vI-Ia for pgsql-general@arkaria.postgresql.org; Fri, 01 Oct 2021 12:03:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mWHGH-000475-HB for pgsql-general@arkaria.postgresql.org; Fri, 01 Oct 2021 12:03:33 +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 1mWHGH-00046x-88 for pgsql-general@lists.postgresql.org; Fri, 01 Oct 2021 12:03:33 +0000 Received: from brisi.sourcepole.ch ([5.9.57.43]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mWHGF-0007NU-9M for pgsql-general@lists.postgresql.org; Fri, 01 Oct 2021 12:03:32 +0000 Received: from [213.55.225.106] (helo=[192.168.43.81]) by vilan-mail with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mWHGD-0002sW-OR for pgsql-general@lists.postgresql.org; Fri, 01 Oct 2021 14:03:29 +0200 Subject: Re: postgresql11: How to use publication/subscription on primary/standby setup To: pgsql-general@lists.postgresql.org References: From: Tomas Pospisek Message-ID: Date: Fri, 1 Oct 2021 14:03:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 29.09.21 11:01, Abhishek B wrote: > Is there a solution to use publication/subscription on a master-slave or > primary-standby postgres setup without manual intervention? > > Currently the DB clusters are managed by Pacemaker. Once there is a > failover, the pacemaker is able to promote the secondary node to > primary, but the logical replication stops working after that. Is there > any way to automatically move the contents of pg_replslot to the new > primary node? I'm not sure I understand you correctly, but I'd suggest to have a look at patroni, which maybe does what you want. *t