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 1lKnkf-00079F-VC for pgsql-admin@arkaria.postgresql.org; Fri, 12 Mar 2021 19:47:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lKnke-0007Zo-Q2 for pgsql-admin@arkaria.postgresql.org; Fri, 12 Mar 2021 19:47:12 +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 1lKnke-0007Y5-Hc for pgsql-admin@lists.postgresql.org; Fri, 12 Mar 2021 19:47:12 +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 1lKnkc-0006On-4d for pgsql-admin@postgresql.org; Fri, 12 Mar 2021 19:47:12 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1lKnka-0002C5-RD; Fri, 12 Mar 2021 14:47:08 -0500 Date: Fri, 12 Mar 2021 14:47:08 -0500 From: Bruce Momjian To: tsuraan Cc: pgsql-admin@postgresql.org Subject: Re: Streaming replication upgrade sanity check Message-ID: <20210312194708.GB5362@momjian.us> References: <20210312005016.GV20766@tamriel.snowman.net> <20210312005557.GA2999@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 12, 2021 at 10:53:11AM -0600, tsuraan wrote: > > He/she wants to run the standby, I guess in read-only mode, while > > pg_upgrade is running, which is why I didn't even bother to mention > > that. I think if downtime is the critical for this person, he/she > > should be using logical replication for the upgrade. pg_upgrade really > > wants full control of the primary/standbys during its operation, and if > > you can't do that, pg_upgrade is not the right tool to use. > > This thread blew up a bit overnight, so I guess I might be getting a > bit repetitive, but it's less about super low downtime and more about > just not having all that much control over everything. The systems are > installed all over the world, and the upgrade process is very solid > and well understood (by my client's devs), but it's pretty reliant on > the main database being running, and also standby systems are fairly > independent, so doing a lot of coordination is somewhere between > complicated and maybe not entirely possible. > > I do just want to clarify the bit about pg_upgrade wanting full > control over standbys. I'm looking over the page again, and it does > list some prereqs to make sure things will run smoothly on the > standby, but if I do just abandon the standby systems and do a new > pg_basebackup on them once the master is running again, that's not > going to cause any issues on the master, right? I haven't had any > explosions in testing, but none of my test systems are anywhere near > as large or busy as the larger customers, so I definitely could be > missing things. Right, just making new standbys is simple. The basic idea is that pg_upgrade will complain about anything that isn't exactly as required, to avoid invisible upgrade failures. When you started asking about exactly how we could stretch pg_upgrade, we started to have to discuss exactly what we could relax with 100% reliability, and we didn't come up with many options. We are happy to continue that discussion but we don't have any good ideas right now. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee