Re: Impact of checkpointer during pg_upgrade - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Impact of checkpointer during pg_upgrade
Date
Msg-id CAA4eK1JNGT9Mf+8keiAy3CSYiykAgTz+u4bWBJ3mB_3cK6SvpQ@mail.gmail.com
Whole thread Raw
In response to Re: Impact of checkpointer during pg_upgrade  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: Impact of checkpointer during pg_upgrade
List pgsql-hackers
On Mon, Sep 4, 2023 at 4:19 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> Said that there is a possibility that some of the slots which got
> invalidated even on the previous checkpoint might get the same LSN as
> the slot which got invalidated later if there is no activity between
> these two checkpoints. So if we go with this approach then there is
> some risk of migrating some of the slots which were already
> invalidated even before the shutdown checkpoint.
>

I think even during the shutdown checkpoint, after writing shutdown
checkpoint WAL, we can invalidate some slots that in theory are safe
to migrate/copy because all the WAL for those slots would also have
been sent. So, those would be similar to what we invalidate during the
upgrade, no? If so, I think it is better to have the same behavior for
invalidated slots irrespective of the time it gets invalidated. We can
either give an error for such slots during the upgrade (which means
disallow the upgrade) or simply ignore such slots during the upgrade.
I would prefer ERROR but if we want to ignore such slots, we can
probably inform the user in some way about ignored slots, so that she
can later drop corresponding subscritions or recreate such slots and
do the required sync-up to continue the replication.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: psql: show current user in prompt
Next
From: Amit Kapila
Date:
Subject: Re: persist logical slots to disk during shutdown checkpoint