| From: | Jeff Davis <jdavis(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix REASSIGN OWNED for subscriptions in other databases. |
| Date: | 2026-07-18 16:27:53 |
| Message-ID: | E1wl7tI-000nOQ-1z@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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 <dilipbalaut(at)gmail(dot)com>
Reported-by: Noah Misch <noah(at)leadboat(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Discussion: https://postgr.es/m/20260710192533.4f.noahmisch@microsoft.com
Backpatch-through: 19
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/e727c6f2ef5c75a282fbef9cb8adc0c1c6c7978e
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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-07-18 16:57:49 | pgsql: Restore the ability to use | and -> as prefix operators. |
| Previous Message | Jeff Davis | 2026-07-18 16:27:47 | pgsql: Fix REASSIGN OWNED for subscriptions in other databases. |