Re: Identify missing publications from publisher while create/alter subscription.

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Identify missing publications from publisher while create/alter subscription.
Date: 2021-05-03 08:15:46
Message-ID: CAFiTN-u1vGircUdyumP1K_=_fx8pvZmgYFsDZh+m0vNDpndECQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 3, 2021 at 10:48 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Sun, May 2, 2021 at 10:04 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > Thanks for the comments.
> > The Attached patch has the fixes for the same.
>
> I was reviewing the documentation part, I think in the below paragraph
> we should include validate_publication as well?
>
> <varlistentry>
> <term><literal>connect</literal> (<type>boolean</type>)</term>
> <listitem>
> <para>
> Specifies whether the <command>CREATE SUBSCRIPTION</command>
> should connect to the publisher at all. Setting this to
> <literal>false</literal> will change default values of
> <literal>enabled</literal>, <literal>create_slot</literal> and
> <literal>copy_data</literal> to <literal>false</literal>.
> </para>
>
> I will review/test the other parts of the patch and let you know.

I have reviewed it and it mostly looks good to me. I have some minor
suggestions though.

1.
+/*
+ * Check the specified publication(s) is(are) present in the publisher.
+ */

vs

+
+/*
+ * Connect to the publisher and check if the publications exist.
+ */

I think the formatting of the comments are not uniform. Some places
we are using "publication(s) is(are)" whereas other places are just
"publications".

2. Add a error case for connect=false and VALIDATE_PUBLICATION = true

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-05-03 09:15:08 how to correctly cast json value to text?
Previous Message Dilip Kumar 2021-05-03 08:11:21 Re: Enhanced error message to include hint messages for redundant options error