On Mon, Nov 13, 2023 at 1:52 PM Michael Paquier <mich...@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.