agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Improve DROP SERVER handling of dependent subscriptions. 2+ messages / 1 participants [nested] [flat]
* pgsql: Improve DROP SERVER handling of dependent subscriptions. @ 2026-08-03 20:29 Jeff Davis <jdavis@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Jeff Davis @ 2026-08-03 20:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve DROP SERVER handling of dependent subscriptions. We do not allow a DROP SERVER ... CASCADE to implicitly drop a subscription, because it's in a shared catalog and dropping a subscription has side effects. Instead we throw an error and the user must drop the subscription explicitly. Document this behavior and add a HINT to the error message. Generalize AcquireDeletionLock()/ReleaseDeletionLock() to use shared object locks for all shared catalogs, which includes AuthMemRelationId and now SubscriptionRelationId. Move error message after AcquireDeletionLock() to avoid an unnecessary error if there's a concurrent DROP SUBSCRIPTION. Addresses finding 10 & 15 in report from linked discussion. Reported-by: Noah Misch <noah@leadboat.com> Discussion: https://postgr.es/m/20260710195902.4f.noahmisch@microsoft.com Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/b66ea17a3a1383a24096ba6a3fe1e83c5c059a35 Modified Files -------------- doc/src/sgml/ref/drop_server.sgml | 4 ++++ src/backend/catalog/dependency.c | 31 +++++++++++++++++------------- src/test/regress/expected/subscription.out | 4 ++++ src/test/regress/sql/subscription.sql | 2 ++ 4 files changed, 28 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Improve DROP SERVER handling of dependent subscriptions. @ 2026-08-03 20:29 Jeff Davis <jdavis@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Jeff Davis @ 2026-08-03 20:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve DROP SERVER handling of dependent subscriptions. We do not allow a DROP SERVER ... CASCADE to implicitly drop a subscription, because it's in a shared catalog and dropping a subscription has side effects. Instead we throw an error and the user must drop the subscription explicitly. Document this behavior and add a HINT to the error message. Generalize AcquireDeletionLock()/ReleaseDeletionLock() to use shared object locks for all shared catalogs, which includes AuthMemRelationId and now SubscriptionRelationId. Move error message after AcquireDeletionLock() to avoid an unnecessary error if there's a concurrent DROP SUBSCRIPTION. Addresses finding 10 & 15 in report from linked discussion. Reported-by: Noah Misch <noah@leadboat.com> Discussion: https://postgr.es/m/20260710195902.4f.noahmisch@microsoft.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/608704adee75fd4316a10f4aa9a93aa8c6dc7eeb Modified Files -------------- doc/src/sgml/ref/drop_server.sgml | 4 ++++ src/backend/catalog/dependency.c | 31 +++++++++++++++++------------- src/test/regress/expected/subscription.out | 4 ++++ src/test/regress/sql/subscription.sql | 2 ++ 4 files changed, 28 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-08-03 20:29 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-08-03 20:29 pgsql: Improve DROP SERVER handling of dependent subscriptions. Jeff Davis <jdavis@postgresql.org> 2026-08-03 20:29 pgsql: Improve DROP SERVER handling of dependent subscriptions. Jeff Davis <jdavis@postgresql.org>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox