RE: Re-read subscription state after lock in AlterSubscription
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, 'Dilip Kumar' <dilipbalaut@gmail.com>
Date: 2026-07-02T12:48:53Z
Lists: pgsql-hackers
Dear Bertrand, Good catch. Current code allows that old `sub` value is retained, so it sounds reasonable fix even for me. BTW, the issue that GetSubscription() is called before the LockSharedObject() looks the existing issues even on REL_13_STABLE. So does it mean that there were no cases that concurrent altering can be the unexpected state? At least, "retain_dead_tuples" can avoid the issue because the launcher manages the conflict slot. Best regards, Hayato Kuroda FUJITSU LIMITED