RE: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Jeff Davis' <pgsql(at)j-davis(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>
Subject: RE: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.
Date: 2026-07-29 02:35:36
Message-ID: OS9PR01MB121498B4C6146A66793E036C1F5CA2@OS9PR01MB12149.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Jeff,

> There are two other threads discussing closely-related problems:
>
> https://www.postgresql.org/message-id/CAHGQGwFGa6+wWVgUmZPFwN=fB
> Y59mYPkMK3=TxT=Pv5C1mNNRQ(at)mail(dot)gmail(dot)com
> https://www.postgresql.org/message-id/OS9PR01MB12149C3ED34272966B25
> DB173F5C12(at)OS9PR01MB12149(dot)jpnprd01(dot)prod(dot)outlook(dot)com

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2026-07-29 02:46:56 RE: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server
Previous Message Bharath Rupireddy 2026-07-29 01:53:00 Re: Fix stale comment in parallel_vacuum_main().