| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql(at)j-davis(dot)com |
| Cc: | akapila(at)postgresql(dot)org, dilipbalaut(at)gmail(dot)com, nisha(dot)moond412(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org |
| Subject: | REASSIGN OWNED vs. relisshared dep on !relisshared |
| Date: | 2026-07-10 19:25:33 |
| Message-ID: | 20260710192533.4f.noahmisch@microsoft.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
v19 commit 8185bb5 added field pg_subscription.subserver, and v20 commit
a5918fd added field pg_subscription.subconflictlogrelid. Each involves a
dependency link from the relisshared pg_subscription to a !relisshared
catalog. REASSIGN OWNED, if run in a database other than
pg_subscription.subdbid, wrongly interprets those fields relative to the
current database. This causes an error or opens an unrelated object.
Perhaps one could fix this by having REASSIGN OWNED process only
pg_subscription rows where subdbid is the current database. Already, one must
run REASSIGN OWNED in each database for ordinary db-local objects like tables.
From a user's perspective, REASSIGN OWNED would reach subscriptions like it
reaches tables.
I'm nervous that we'll have other reasons to regret letting a shared object
depend on a non-shared object, but I've not come up with anything else
concrete.
Ops 4.8 wrote the attached test cases. (The subserver test patch has tests
for some other behaviors, which I'll post about elsewhere.)
| Attachment | Content-Type | Size |
|---|---|---|
| test-subscription-server-v0.patch | text/plain | 12.1 KB |
| test-subconflictlogrelid-REASSIGN-OWNED-v0.patch | text/plain | 5.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-07-10 19:59:02 | CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc. |
| Previous Message | Melanie Plageman | 2026-07-10 19:12:18 | Re: Why clearing the VM doesn't require registering vm buffer in wal record |