Re: pg_upgrade and logical replication - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: pg_upgrade and logical replication
Date
Msg-id CAA4eK1KGZ+a+7u6UknBiNAyfOokAApdTToNq6e4qgvkp2c5aPw@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade and logical replication  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pg_upgrade and logical replication[
List pgsql-hackers
On Mon, Nov 13, 2023 at 1:52 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> It seems to me that INIT cannot be relied on for a similar reason.
> This state would be set for a new relation in
> LogicalRepSyncTableStart(), and the relation would still be in INIT
> state when creating the slot via walrcv_create_slot() in a second
> transaction started a bit later.
>

Before creating a slot, we changed the state to DATASYNC.

>
>  However, if we have a failure after
> the transaction that created the slot commits, then we'd have an INIT
> relation in the catalog that got committed *and* a slot related to it
> lying around.
>

I don't think this can happen otherwise this could be a problem even
without an upgrade after restart.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add new option 'all' to pg_stat_reset_shared()
Next
From: Junwang Zhao
Date:
Subject: Re: Re: How to solve the problem of one backend process crashing and causing other processes to restart?