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 1nboPN-0005Tj-62 for pgsql-docs@arkaria.postgresql.org; Tue, 05 Apr 2022 19:00:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nboPK-0008IJ-QI for pgsql-docs@arkaria.postgresql.org; Tue, 05 Apr 2022 19:00:02 +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 1nboPK-0008Fc-If for pgsql-docs@lists.postgresql.org; Tue, 05 Apr 2022 19:00:02 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nboPI-0004ws-0Z for pgsql-docs@lists.postgresql.org; Tue, 05 Apr 2022 19:00:02 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1nboPB-006KNX-3t; Tue, 05 Apr 2022 14:59:53 -0400 Date: Tue, 5 Apr 2022 14:59:53 -0400 From: Bruce Momjian To: Stephen Frost Cc: Robert Haas , Laurenz Albe , pgsql-docs@lists.postgresql.org Subject: Re: Improve documentation for pg_upgrade, standbys and rsync Message-ID: References: <22f129004bb66cd91e1dfd3345a9787f5039f3ae.camel@cybertec.at> <20210519143135.GI20766@tamriel.snowman.net> <20210716131744.GA20766@tamriel.snowman.net> <20210726191126.GW20766@tamriel.snowman.net> <20220405171038.GU10577@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220405171038.GU10577@tamriel.snowman.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Apr 5, 2022 at 01:10:38PM -0400, Stephen Frost wrote: > 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. Well, I think pg_upgrade needs a tool, let alone for standby upgrades, but 13 years in, no one has written one, so I am not holding my breath. Also, we need to document the procedure _somewhere_ --- if we don't the only procedure is embedded in a tool. and that seems even worse than what we have now. > 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. I thought that was true for pg_upgrade in general? ;-) Seems like a pull up your sleeves and hold your nose --- I am good at those tasks. ;-) Should I work on this? Tangentially, I see that my old macros fastgetattr and heap_getattr have finally been retired by commit e27f4ee0a7. :-) -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson