Dear Amit,
> Sorry, my analysis was not complete. On looking closely, I think the
> reason is that we are allowed to upgrade the slot iff there is no
> pending WAL to be processed.
Yes, the guard will strongly protect from data loss, but I do not take care in the test.
> The test first disables the subscription
> to avoid unnecessary LOGs on the subscriber and then stops the
> publisher node.
Right. Unnecessary ERROR would be appeared if we do not disable.
> It is quite possible that just before the shutdown of
> the server, autovacuum generates some WAL record that needs to be
> processed,
Yeah, pg_upgrade does not ensure that autovacuum is not running *before* the
upgrade.
> so you propose just disabling the autovacuum for this test.
Absolutely correct.
Best Regards,
Hayato Kuroda
FUJITSU LIMITED