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

From: yuanchao zhang <145zhangyc(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(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 01:45:44
Message-ID: CADhuQqXwjaJm+pzSib_8p5-=qpimTm22LfNL4u_5E7MVqkHDEA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 22, 2026 at 8:34 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> 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
>

Thanks for updating the patch, v2 LGTM.

Regards,
Yuanchao Zhang

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-07-22 01:47:34 Re: Fix optind handling inconsistency in getopt_long() for missing argument
Previous Message Michael Paquier 2026-07-22 01:29:23 Re: injection_points: canceled or terminated waiters leak their wait slots