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 1jYyrS-00019T-MU for pgsql-general@arkaria.postgresql.org; Wed, 13 May 2020 21:24:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYyrR-0008Mk-Bm for pgsql-general@arkaria.postgresql.org; Wed, 13 May 2020 21:24:17 +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 1jYyrR-0008Mc-44 for pgsql-general@lists.postgresql.org; Wed, 13 May 2020 21:24:17 +0000 Received: from ns76.e-blokos.com ([51.79.78.76] helo=node76.e-blokos.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYyrO-0008Hk-F5 for pgsql-general@lists.postgresql.org; Wed, 13 May 2020 21:24:15 +0000 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by node76.e-blokos.com (8.15.2/8.15.2) with ESMTP id 04DLOAdV048165 for ; Wed, 13 May 2020 21:24:12 GMT Subject: Re: Reuse an existing slot with a new initdb To: pgsql-general@lists.postgresql.org References: <5f198805-8fd4-b49b-4046-e98fb80dea74@e-blokos.com> <48699aec-7736-6b8a-cd92-fe6d93db6a78@e-blokos.com> <48434f500ee2bf9572e6bbff143be073114f8c42.camel@cybertec.at> From: Support Message-ID: <531b9a99-8d36-3699-d886-3f6eabd762cb@e-blokos.com> Date: Wed, 13 May 2020 14:24:09 -0700 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <48434f500ee2bf9572e6bbff143be073114f8c42.camel@cybertec.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/13/2020 1:24 PM, Laurenz Albe wrote: > On Wed, 2020-05-13 at 06:18 -0700, Support wrote: >> On 5/8/2020 1:51 PM, Support wrote: >>> I normalized my replislots with the name of my nodes. >>> I have 2 options in my recovery script that tries first pg_basebackup >>> to recover and sync the hot standby, but unfortunately big DB fails >>> sometimes due >>> to very slow or unstable network. So my second option is to completely >>> make a new inidb and import an sql file from pg_dumpall master as it >>> takes less bytes once compressed. But I'm facing an issue with the >>> slot complaining (obviously) about the ho standby node that does not >>> match the slot identifier. So my question is simple, is there a way to >>> reinitialize the slot to not renew the identifier with the new hot >>> standby initdb? >> No one has an answer to my question? > That may be because your question is hard to understand. > > You cannot create a standby server using "pg_dumpall", so it is > unclear what exactly you are doing here. > > Also, it is not clear what error message you get. > > Yours, > Laurenz Albe I didn't recal that it was not possible to create a hot standby with a fresh new install and pg_dumpall . only pg_basebackup or an exact copy of the data folder can do it right? is the reason technical or else? Each has apparently an internal identifier  based on the hot standby initdb when it connected to the master the first time(?) or when a pg_basebackup occured previously this identifier (unique bigint) obviously does not match if I connect the hot standby with a new initdb and a restore from pg_dumpall copy of the master. Sad because everything seems to be running but the master just does not like the identifier doesn't match up. (sorry I cannot show you the original error since I run the db in prod now)