Re: Validate SERVER subscription conninfo during ALTER SUBSCRIPTION ... OWNER TO

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: yuanchao zhang <145zhangyc(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Validate SERVER subscription conninfo during ALTER SUBSCRIPTION ... OWNER TO
Date: 2026-07-22 00:33:51
Message-ID: CAHGQGwEZkmopzr62vgRn9xeSNH9_WWRhsUn4Z6BMH_RES7y-Wg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 21, 2026 at 4:37 PM yuanchao zhang <145zhangyc(at)gmail(dot)com> wrote:
> Sounds correct to me to do the conninfo validation.

Thanks for the review!

> A small comment on the documentation change:
>
> + for the new owner or for <literal>PUBLIC</literal> must exist, and the
> + connection string generated for the new owner must satisfy the subscription's
> + <literal>password_required</literal> setting.
>
> From the implementation, only when a new owner is not superuser, it needs to satisfy the password_required setting.

Agreed. I've updated the patch as suggested. The updated version is attached.

- connection string generated for the new owner must satisfy the
subscription's
- <literal>password_required</literal> setting.
+ connection string generated for the new owner must be valid. If the new
+ owner is not a superuser and the subscription has
+ <literal>password_required=true</literal>, the generated connection string
+ must include a password.

Regards,

--
Fujii Masao

Attachment Content-Type Size
v2-0001-Validate-subscription-conninfo-on-owner-change.patch application/octet-stream 8.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-07-22 00:40:10 Re: Validate SERVER subscription conninfo during ALTER SUBSCRIPTION ... OWNER TO
Previous Message Ian Lawrence Barwick 2026-07-22 00:21:33 Re: [PATCH] Add pg_get_event_trigger_ddl() function