Fix REASSIGN OWNED for subscriptions in other databases. Subscription objects are conceptually database-local objects, but pg_subscription is a shared catalog so that the launcher process can scan it.
Check readers of pg_subscription to ensure that, unless it's the launcher process, it filters by MyDatabaseId. Most readers were already doing so, but this commit fixes REASSIGN OWNED and adds guards to catch other problems in the future. Also, clarify documentation. Author: Dilip Kumar <[email protected]> Reported-by: Noah Misch <[email protected]> Reviewed-by: shveta malik <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/03bcb6a7778e3eaa148c98107d878e2bd9b8a27b Modified Files -------------- contrib/postgres_fdw/t/010_subscription.pl | 45 ++++++++++++++++++++++++++++++ doc/src/sgml/ref/reassign_owned.sgml | 5 +++- doc/src/sgml/user-manag.sgml | 4 ++- src/backend/catalog/pg_subscription.c | 12 ++++++++ src/backend/commands/subscriptioncmds.c | 14 +++++++++- 5 files changed, 77 insertions(+), 3 deletions(-)
