Re: lost replication slots after pg_upgrade

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lost replication slots after pg_upgrade
Date: 2020-10-13 21:34:27
Message-ID: b9aec528-f2a0-7ab0-4350-c95701b4ecce@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-10-13 19:23, Pavel Stehule wrote:
> no, I just missi note, so after upgrade by pg_upgrade I have to recreate
> replication slots. Some like
>
> after pg_upgrade you should to do:
>
> a) run analyze .... (it is a known case)
> b) recreate replication slots - these slots are not removed in the
> upgrade process.

An argument could be made that pg_upgrade should copy over logical
replication slots. The normal scenario would be that you pause your
logical subscriptions, run pg_upgrade on the publisher, then un-pause
the subscriptions. The subscribers then ought to be able to reconnect
and continue consuming logical changes. Since the content of the
publisher database is logically the same before and after the upgrade,
this should appear transparent to the subscribers. They'll just see
that the publisher was offline for a while.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2020-10-13 21:37:18 Re: lost replication slots after pg_upgrade
Previous Message Russell Foster 2020-10-13 21:08:55 Re: [Patch] Using Windows groups for SSPI authentication