agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix REASSIGN OWNED for subscriptions in other databases.
Date: Sat, 18 Jul 2026 16:27:53 +0000
Message-ID: <E1wl7tI-000nOQ-1z@gemulon.postgresql.org> (raw)
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@gmail.com>
Reported-by: Noah Misch <noah@leadboat.com>
Reviewed-by: shveta malik <shveta.malik@gmail.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(-)
view thread (2+ messages)
Message-ID: <E1wl7tI-000nOQ-1z@gemulon.postgresql.org>
Permalink: ../E1wl7tI-000nOQ-1z@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wl7tI-000nOQ-1z@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix REASSIGN OWNED for subscriptions in other databases.
In-Reply-To: <E1wl7tI-000nOQ-1z@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox