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 1jtvEN-0002ks-83 for pgsql-general@arkaria.postgresql.org; Fri, 10 Jul 2020 15:46:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtvEK-0001ox-Pe for pgsql-general@arkaria.postgresql.org; Fri, 10 Jul 2020 15:46:28 +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 1jtvEK-0001ok-Hv for pgsql-general@lists.postgresql.org; Fri, 10 Jul 2020 15:46:28 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtvDq-0000lV-E6 for pgsql-general@lists.postgresql.org; Fri, 10 Jul 2020 15:46:27 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id CA4E55F79F; Fri, 10 Jul 2020 11:45:56 -0400 (EDT) Date: Fri, 10 Jul 2020 11:45:56 -0400 From: Stephen Frost To: Paul =?iso-8859-1?Q?F=F6rster?= Cc: James Sewell , "pgsql-generallists.postgresql.org" Subject: Re: Safe switchover Message-ID: <20200710154556.GL12375@tamriel.snowman.net> References: <7E43945E-4571-4D30-9E8F-B940B9277DEF@gmail.com> <20200710152959.GK12375@tamriel.snowman.net> <01BE6868-6920-4E5D-9A4D-838E3036DCD2@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TnYVF1hk1c8rpHiF" Content-Disposition: inline In-Reply-To: <01BE6868-6920-4E5D-9A4D-838E3036DCD2@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --TnYVF1hk1c8rpHiF Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Paul F=F6rster (paul.foerster@gmail.com) wrote: > > On 10. Jul, 2020, at 17:29, Stephen Frost wrote: > > Patroni also has the option to use pgbackrest instead of pg_rewind. >=20 > right. Sorry, I forgot about that. We use pg_rewind which works great. Sure, if you know exactly why the former primary failed and have confidence that nothing actually bad happened then pg_rewind can work (though it's still not what I'd generally recommend). If you don't actually know what happened to the former primary to cause it to fail then I definitely wouldn't use pg_rewind on it since it doesn't have any checks to make sure that the data is actually generally consistent. These days you could get a bit of a better feeling by running pg_checksums against the data dir, but that's not going to be as good as doing a pgbackrest delta restore when it comes to making sure that everything is valid. Thanks, Stephen --TnYVF1hk1c8rpHiF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJfCI00AAoJEO1sijiDR2RVt9YQAJMZWLC1myrCHrrbDWDvjSHX +RaUIDet2gTMHRqhWzNndAuAShkLqFiO8x8qYP6T3Ax72NNoH2DQTxvQTfUY+Sl4 rnFCRKW6A9sv3bj1VIaVIQ2zBh86do7Hqgd8sZG4dqCD8IRwBkHaY5z2V4xIVTmO FgfIsP7PePuf1d21Y0GO3aUCwGCrrsT+bezrFbpoageQ6Fp4JKeVhE9E/0iXZkhj iZ81gO4I8I9BejXLzQfWHQCCyyE39Rjq4/wXsZnSLhJIx6fng8Ykxjt1Q9VCBUqF K0tlBWgBtS445fM39ZpMLR2YKfPLZkvMlS9+6koDHm0/+1KGic/aRQod3YMnFCan FY8Bx2tx1UgDijVpuHjRxrkz+kpWGq1B3ugcoRBtKUlHCaJzYpBCfAm+hfpW3c6N r4g8mHlvWyVO3THzS7jazsMtj1WOo3zK3tv+NtiQHC3jXggpW8JSsdUoEcDMZTUj GHNRb5TO6oXRLa/eUjGjA+bByOL9rAWsOC11/TiT2ODJOu+pdJHYdlItwxGptkbu oKURaoewUHnr9IB6AKAujNis1Ixf1l6ixB22OkoOVICKX0uNt2StNDtLp4ADpY4m dz4aDbPMBpiUURSSAUSqZn0SzQrO6VCg/7qtumghS8uR6KTBkzOXL4EIAU+r+4Sz z1pa4+WKymOaXFQJ2Lbp =Kkc6 -----END PGP SIGNATURE----- --TnYVF1hk1c8rpHiF--