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 1nbmhX-0001rK-Sb for pgsql-docs@arkaria.postgresql.org; Tue, 05 Apr 2022 17:10:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nbmhW-0002Fs-MK for pgsql-docs@arkaria.postgresql.org; Tue, 05 Apr 2022 17:10:42 +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 1nbmhW-0002Fj-EA for pgsql-docs@lists.postgresql.org; Tue, 05 Apr 2022 17:10:42 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nbmhT-0003ud-Tv for pgsql-docs@lists.postgresql.org; Tue, 05 Apr 2022 17:10:41 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 591B65F7A2; Tue, 5 Apr 2022 13:10:38 -0400 (EDT) Date: Tue, 5 Apr 2022 13:10:38 -0400 From: Stephen Frost To: Robert Haas Cc: Laurenz Albe , pgsql-docs@lists.postgresql.org Subject: Re: Improve documentation for pg_upgrade, standbys and rsync Message-ID: <20220405171038.GU10577@tamriel.snowman.net> References: <22f129004bb66cd91e1dfd3345a9787f5039f3ae.camel@cybertec.at> <20210519143135.GI20766@tamriel.snowman.net> <20210716131744.GA20766@tamriel.snowman.net> <20210726191126.GW20766@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="N9nS8Yqueyt4m6+M" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --N9nS8Yqueyt4m6+M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Robert Haas (robertmhaas@gmail.com) wrote: > On Mon, Jul 26, 2021 at 3:11 PM Stephen Frost wrote: > > * Laurenz Albe (laurenz.albe@cybertec.at) wrote: > > > Thanks for looking at this! > > > > Sure. Thanks for working on it! >=20 > Stephen, do you intend to do something about this patch in terms of > getting it committed? You're the only reviewer but haven't responded > to the thread for more than 5 months. I tried to be clear in the last email on the thread, the one which you just responded to, here: * Stephen Frost (sfrost@snowman.net) wrote: > This, of course, all comes back to the original complaint I had about > documenting this approach, which is that these things should only be > done by someone extremely familiar with the PG codebase, until and > unless we write an actual tool to do this. To be more explicit though- we should write a tool to do this. We shouldn't try to document a way to do it because it's hard to get right. While rsync is very capable, what's needed to really do this goes beyond what we could reasonably put into any rsync command or really even into a documented procedure. I get that we already have it documented (and I'll note that doing so was against my recommendation..) and that some folks (likely those who follow this mailing list) have had success using it, but I'd really rather we just take it out and put it on a wiki somewhere as a "we need a tool that does this stuff" and hope that someone finds time to write one. > I don't feel that I know this area of the documentation well enough to > feel comfortable passing judgement on whether this change is an > improvement or not. However I do feel somewhat uncomfortable with > this: >=20 > - > - Prepare for standby server upgrades > - > - > - If you are upgrading standby servers using methods outlined in > section - linkend=3D"pgupgrade-step-replicas"/>, verify that the old standby > - servers are caught up by running pg_controldata > - against the old primary and standby clusters. Verify that the > - Latest checkpoint location values match in all clust= ers. > - (There will be a mismatch if old standby servers were shut down > - before the old primary or if the old standby servers are still runn= ing.) > - Also, make sure wal_level is not set to > - minimal in the > postgresql.conf file on the > - new primary cluster. > - > - >=20 > Right now, we say that you should stop the standby servers and then > prepared for standby server upgrades. With this patch, we say that you > should first prepare for standby server upgrades, and then stop the > standby servers. But the last part of the text about preparing for > standby server upgrades now mentions things to be done after carrying > out the next step where the servers are actually stopped. That seems > confusing. Perhaps we need two separate steps here, one to be > performed before stopping both servers and the other after. It should really be both- things to do on the primary ahead of time (truncate all unlogged tables, make sure there aren't any orphaned temporary tables, etc), and then things to do on the replicas after shutting the primary down (basically, make sure they are fully caught up with where the primary was at shutdown). I tried to explain that in my prior email but perhaps didn't do a very good job. > Also, let me express my general terror at the idea of anyone actually > using this procedure. I mean, yeah, I agree. Thanks, Stephen --N9nS8Yqueyt4m6+M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJiTHgNAAoJEO1sijiDR2RVBr4QAJ5lbMvc5uC1gCz7EcJbcQCJ pddHFIabDp/M76Jy6VruQ80PI2zVB99D/MCfHD7cQ3SR8Kou2JAiXZ8HEpBZw6VL VqFNaQN/Ob4T+sZJh81c4mHJ29SlAOjqLsl7oCHRyAcsSNGdzGCEYTkmUKcoDxJz XOKwSbF2M6rv3RGsGBxA6TLNmyXHfRY1npkhSZKCN5LJH3geysyUQwWPff/1nfAL /uXo+8K+hb7rjM8/SheAVOXaoNLVYLfq4yri765NsHCBMZhM1SC78QynB19NdqjH guVqY7fbvKOkRAwqEkPMBfudvoLFcHhRzKtFMtfrZZK7jyaBwe+7eGBupN1/IpXp EqUTRZOxbBiT/3DMSFpNdLW1RCG7I40DCtBnBx290+oZdNc2gKD9w40/jwJ7Z03z BZPTr1Bmb6/felqCp48dnlwfXAitdyUN6nFC5PN0Phc36u7hDlQchYxfMMpQJt08 5YyzmbXYgIUbTwVevlV75tJUXcySkSTv2A/zlYd0Nw7vmiTODSTQ4KRAzYYqQXCX 3sAFI+tb+UOfTeB28q4IphAmMlk6QEdlSP0cQc2j9vOyq8LXFO4XS5CnGwrv3uUu Om2g5/n6larYynsQTJS/I4cjj/5T/2StBUC05GNhqSZrsmjNzKjU/eC58tpFhhTT 8hhd3n29OjLnAvw0p6h+ =bOCH -----END PGP SIGNATURE----- --N9nS8Yqueyt4m6+M--