RE: CREATE SUBSCRIPTION -- add missing tab-completes

From: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: CREATE SUBSCRIPTION -- add missing tab-completes
Date: 2023-04-07 10:35:33
Message-ID: OS0PR01MB5716425520250C0A8C88F85D94969@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Friday, April 7, 2023 5:11 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Apr 7, 2023 at 1:12 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
> wrote:
> >
> > On Fri, Apr 7, 2023 at 2:28 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> wrote:
> > >
> > > On Wed, Apr 5, 2023 at 5:58 AM Peter Smith <smithpb2250(at)gmail(dot)com>
> wrote:
> > > >
> > >
> > > LGTM, so pushed. BTW, while looking at this, I noticed that newly
> > > added options "password_required" and "run_as_owner" has incorrectly
> > > mentioned their datatype as a string in the docs. It should be
> > > boolean.
> >
> > +1
> >
> > > I think "password_required" belongs to first section of docs which
> > > says: "The following parameters control what happens during
> > > subscription creation".
> >
> > But the documentation of ALTER SUBSCRIPTION says:
> >
> > The parameters that can be altered are slot_name, synchronous_commit,
> > binary, streaming, disable_on_error, password_required, run_as_owner,
> > and origin. Only a superuser can set password_required = false.
> >
>
> By the above, do you intend to say that all the parameters that can be altered
> are in the second list? If so, slot_name belongs to the first category.
>
> > ISTM that both password_required and run_as_owner are parameters to
> > control the subscription's behavior, like disable_on_error and
> > streaming. So it looks good to me that password_required belongs to
> > the second section.
> >
>
> Do you mean that because 'password_required' is used each time we make a
> connection to a publisher during replication, it should be in the second
> category? If so, slot_name is also used during the start replication each time.
>
> BTW, do we need to check one or both of these parameters in
> maybe_reread_subscription() where we "Exit if any parameter that affects the
> remote connection was changed."

I think changing run_as_owner doesn't require to be checked as it only affect
the role to perform the apply. But it seems password_required need to be
checked in maybe_reread_subscription() because we used this parameter for
connection.

Best Regards,
Hou zj

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-04-07 11:28:54 Re: Should vacuum process config file reload more often
Previous Message Michael Paquier 2023-04-07 10:15:24 Re: Add index scan progress to pg_stat_progress_vacuum