Re: [Bug] pg_upgrade could fail for non-superuser subscriptions using foreign servers

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "'pgsql-hackers(at)lists(dot)postgresql(dot)org'" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Bug] pg_upgrade could fail for non-superuser subscriptions using foreign servers
Date: 2026-07-28 16:21:01
Message-ID: 048053d5f43aacdd098e316f595646daa1665c1e.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2026-07-23 at 03:00 +0000, Hayato Kuroda (Fujitsu) wrote:
> Hi hackers,
>
> > My primitive idea for fix is to introduce a new TOC entry to record
> > the OWNER
> > command, in the pg_dump. Unlike the normal CREATE SUBSCRIPTION,
> > this entry
> > can be handled as RESTORE_PASS_POST_ACL.
> > I'm locally working on the idea and will post tomorrow.
>
> So here is a patch. While coding, I found another issue that TOC
> entry for
> "SUBSCRIPTION TABLE" may not be skipped in case of --no-
> subscriptions.
> This can be an issue when:
>
> 1) there are tuples in pg_subscription_rel,
> 2) pg_dump is done with --binary-upgrade then
> 3) pg_restore is done with --no-subscription.
>

Thank you! There's a related discussion here:

https://www.postgresql.org/message-id/e96efe16fb47fcca4ae0cd0157fb6bc662470712.camel@j-davis.com

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-07-28 16:46:43 Re: [PATCH] Possible wrong result from inlining a STRICT SQL function
Previous Message Jeff Davis 2026-07-28 16:18:44 Re: Validate SERVER subscription conninfo during ALTER SUBSCRIPTION ... OWNER TO