RE: [Bug] pg_upgrade could fail for non-superuser subscriptions using foreign servers - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: [Bug] pg_upgrade could fail for non-superuser subscriptions using foreign servers
Date
Msg-id OS9PR01MB121493DA4C1A7748B11A646D8F5C02@OS9PR01MB12149.jpnprd01.prod.outlook.com
Whole thread
List pgsql-hackers
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.

I think it seldom happens, but I could not find reasons to retain.

How do you feel?

Best regards,
Hayato Kuroda
FUJITSU LIMITED


Attachment

pgsql-hackers by date:

Previous
From: Paul Kim
Date:
Subject: Re: Restore vacuum_delay_point() in GIN posting-tree leaf vacuum
Next
From: vignesh C
Date:
Subject: Re: sequencesync worker race with REFRESH SEQUENCES