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 1k5I5E-0006Qn-UG for pgsql-admin@arkaria.postgresql.org; Tue, 11 Aug 2020 00:24:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5I5D-0008NH-St for pgsql-admin@arkaria.postgresql.org; Tue, 11 Aug 2020 00:24:03 +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 1k5I5D-0008N9-Kb for pgsql-admin@lists.postgresql.org; Tue, 11 Aug 2020 00:24:03 +0000 Received: from impout002aa.msg.chrl.nc.charter.net ([47.43.20.26] helo=impout002.msg.chrl.nc.charter.net) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5I57-0007Ng-1W for pgsql-admin@lists.postgresql.org; Tue, 11 Aug 2020 00:24:03 +0000 Received: from cerberus.crazybean.net ([71.11.29.254]) by cmsmtp with ESMTP id 5I53kSQOjh15u5I54k5WU2; Tue, 11 Aug 2020 00:23:54 +0000 Authentication-Results: crazybean.net; none X-Authority-Analysis: v=2.3 cv=etJrMbhX c=1 sm=1 tr=0 a=GkUsAQdcAzAk0MT19QAIRQ==:117 a=GkUsAQdcAzAk0MT19QAIRQ==:17 a=xqWC_Br6kY4A:10 a=y4yBn9ojGxQA:10 a=oIfrFNJ-AAAA:8 a=kHtQhoF6RSyIZpUHopAA:9 a=wklo5KMtNaZhuVwP:21 a=uEM2-AcW_VhHHIdK:21 a=QEXdDO2ut3YA:10 a=RlEsbDEwrY36T1OLNNoA:9 a=5FV_RFkT4ECMPaF4:21 a=QKnFtPexPKGF5Yc7:21 a=YpE0PVhCuK7_Zfky:21 a=_W_S_7VecoQA:10 a=Cg2NcamS17xU0rR7el6q:22 Received: from [IPv6:2001:470:e117:4:e93c:9e9a:f96d:644e] ( [2001:470:e117:4:e93c:9e9a:f96d:644e]) by cerberus.crazybean.net (OpenSMTPD) with ESMTPSA id 4fdf5e23 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 10 Aug 2020 20:23:53 -0400 (EDT) From: Rui DeSousa Message-Id: <457D6CE0-90BE-4F88-87FB-A950F6C40AE5@crazybean.net> Content-Type: multipart/alternative; boundary="Apple-Mail=_FFB15F6F-CBC5-4590-A5DA-6EB2390E1D27" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: Recovery from WAL archives not advancing timeline? Date: Mon, 10 Aug 2020 20:23:53 -0400 In-Reply-To: <8C31D73B-BD43-42FC-A8C5-87DA351BA155@crazybean.net> Cc: Ian Lawrence Barwick , Pgsql-admin To: Don Seiler References: <8C31D73B-BD43-42FC-A8C5-87DA351BA155@crazybean.net> X-Mailer: Apple Mail (2.3608.120.23.2.1) X-CMAE-Envelope: MS4wfMoNal+sFbJutd0PnQVbmt+mp3RWce9U5E6yjXH0ubQGGVk3YjUvTTE5g5j9ALEGX6h/nhl+0nlU1wrFPzKe1LNNL6Bj0BDmmzkS1AOoUS8ey2EFa9jN gBdU/yatnbpHXwybrpdYpkGADBi75I7bK2vlsdta6r/rSU2jRF8eGwELnZzomWHAN7i84KUTy3twfFcUYsAR+oZVHUO8D1+zLcROCFF4zm8BkuAWP0hns7e3 d5/d6LQb4DB1ZcnNjdSB/g== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_FFB15F6F-CBC5-4590-A5DA-6EB2390E1D27 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 10, 2020, at 8:03 PM, Rui DeSousa wrote: >=20 >=20 >=20 >> On Aug 10, 2020, at 4:28 PM, Don Seiler > wrote: >>=20 >> I'm following up to see if anyone else would categorize this as a = bug. It renders my old primaries dead until I do a restore on them. >=20 > No, I don=E2=80=99t think so. When you promote a standby; the primary = will have to be restored or rewinded using pg_rewind to turn it into a = replica. Another approach is to cleanly shutdown the primary and then = you can turn it into a replica without doing a restore or pg_rewind.=20 >=20 Just to be clear if it wasn=E2=80=99t already self evident by my above = statement: The primary needs to be clearly shutdown (all WALs archived), = apply all WALs to replica, promote the replica and then the original = primary can be turn into a replica without a restore or pg_rewind.=20= --Apple-Mail=_FFB15F6F-CBC5-4590-A5DA-6EB2390E1D27 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Aug 10, 2020, at 8:03 PM, Rui DeSousa <rui@crazybean.net> = wrote:



On Aug = 10, 2020, at 4:28 PM, Don Seiler <don@seiler.us> wrote:

I'm following up to see if anyone else would categorize this = as a bug. It renders my old primaries dead until I do a restore on = them.

No, I don=E2=80=99t think so. =  When you promote a standby; the primary will have to be restored = or rewinded using pg_rewind to turn it into a replica.  Another = approach is to cleanly shutdown the primary and then you can turn it = into a replica without doing a restore or pg_rewind. 


Just to be clear if it wasn=E2=80=99t already self evident by = my above statement: The primary needs to be clearly shutdown (all WALs = archived), apply all WALs to replica, promote the replica and then the = original primary can be turn into a replica without a restore or = pg_rewind. 
= --Apple-Mail=_FFB15F6F-CBC5-4590-A5DA-6EB2390E1D27--