Re: Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)
Date: 2017-09-13 00:11:25
Message-ID: VisenaEmail.6e.23512f303b91ae27.15e78932cf5@tc7-visena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

På onsdag 13. september 2017 kl. 01:54:15, skrev Stephen Frost <
sfrost(at)snowman(dot)net <mailto:sfrost(at)snowman(dot)net>>:
Andreas,

* Andreas Joseph Krogh (andreas(at)visena(dot)com) wrote:
> I have to ask; Why not run pg_upgrade on standby, after verifying that it's
in
> sync with primary and promoting it to primary if necessary and then making
it
> standby again after pg_upgrade is finished?

I don't think that we could be guaranteed that the catalog tables would
be the same on the replica as on the primary if they were actually
created by pg_upgrade.

The catalog tables *must* be identical between the primary and the
replica because they are updated subsequently through WAL replay, not
through SQL commands (which is how pg_upgrade creates them in the first
place).

Perhaps we could have some mode for pg_upgrade where it handles the
update to replicas (with the additional checks that I outlined and using
the methodology discussed for rsync --hard-links), but that would still
require solving the communicate-over-the-network problem between the
primary and the replicas, which is the hard part.  Whether it's an
independent utility or something built into pg_upgrade isn't really that
big of a distinction, though it doesn't seem to me like there'd be much
code reuse there.

Thanks!

Stephen
 
Thanks.
 
--
Andreas Joseph Krogh
 

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message xiaolongc 2017-09-13 00:20:42 Some subscriptions fail (while some succeed) with pglogical
Previous Message Daniel Gustafsson 2017-09-13 00:06:50 Re: Small patch for pg_basebackup argument parsing