Re: BUG #19954: pg_upgrade fails to handle foreign data wrapper and event trigger when their owner demoted

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19954: pg_upgrade fails to handle foreign data wrapper and event trigger when their owner demoted
Date: 2026-12-05 17:29:42
Message-ID: CAGRkXqQbtVNXsW4B0qgq_3W2BAq2dJoC-yt3N3OEJo+SKOh5xA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Alexander,

On Sat, Nov 28, 2026, PG Bug reporting form wrote:
> pg_restore: error: could not execute query: ERROR: permission denied to
> change owner of foreign-data wrapper "foo1"

I can reproduce both cases on 15 through master. The attached patch
skips the superuser check on the new owner during binary upgrade, so
pg_upgrade keeps the demoted owner. Plain OWNER TO still checks it.
On 15 a subscription with a demoted owner fails the same way, so a
backpatch there needs that check too.

Thanks,
Shihao

Attachment Content-Type Size
v1-0001-Allow-demoted-FDW-and-event-trigger-owners-in-bin.patch text/x-patch 4.3 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Raja Sai pranav 2026-12-05 18:11:38 Re: btree_gist: <-> fails on same-sign infinite intervals
Previous Message shihao zhong 2026-12-05 17:25:38 Re: BUG #19580: Can not FINALIZE detach partition. Table in stuck