On Sun, 2023-05-21 at 07:56 -0700, Mike Lissner wrote: > > As far as I know it's impossible to reliably pg_upgrade a node > > that has subscriptions and eventually resume logical > > replication. > > > > > Should this go in the documentation somewhere? Maybe in the > pg_upgrade notes? I still don't understand the mechanism. You also > say that: > > > It's possible to make it work with some efforts in some basic > > configurations and / or if no changes happen on the publications > > > > > But that kind of surprises me too, actually, because it seemed like > pg_upgrade wiped out the LSN locations of the subcriber, making it > start all over. > > Upgrading a subscriber seems like something that could/should work, > so it should be documented if pg_upgrade is incompatible with > maintaining a subscription, shouldn't it?
The docs are strangely silent on this. AFAIK pg_upgrade on either the publisher or subscriber breaks logical replication, which does make sense since pg_upgrade basically makes a new database cluster as it runs. There is a way to manually set the LSN position of an enabled=false replication slot, but I've failed to make that work right in tests so far.