Dear Jeff,

> There are two other threads discussing closely-related problems:
> 
> https://www.postgresql.org/message-id/CAHGQGwFGa6+wWVgUmZPFwN=fB
> [email protected]
> https://www.postgresql.org/message-id/OS9PR01MB12149C3ED34272966B25
> [email protected]

Not so closely, but here may be another one: ALTER SUBSCRIPTION REFRESH
PUBLICATION may allow reading foreign servers if even when the user does not
have enough privilege.

> To reconcile these goals, we need to weaken DDL-time validation a bit,
> be more precise about when we try to generate a conninfo, and then be
> sure that restore doesn't do anything that would cause a conninfo to be
> generated or a connection to happen.

Sounds reasonable. To confirm, the deferrable approach could solve the issue
reported by me because ALTER SUBSCRIPTION SET OWNER command won't
check the foreign server's privilege. Is it correct?

[1]: 
https://www.postgresql.org/message-id/CANhcyEU9VsaLwo908ws_1MxNB79f%2Bcr-JVfig%3DZoaf4%2BKQe%2BGQ%40mail.gmail.com

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Reply via email to