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

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Ashutosh Sharma <ashu.coek88@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Jaime Casanova <jcasanov@systemguards.com.ec>, Dilip Kumar <dilipbalaut@gmail.com>, Japin Li <japinli@hotmail.com>, Euler Taveira <euler@eulerto.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-30T06:51:51Z
Lists: pgsql-hackers

Attachments

On Wed, Mar 30, 2022 at 11:22 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Mar 29, 2022 at 8:11 PM vignesh C <vignesh21@gmail.com> wrote:
> >
> > On Tue, Mar 29, 2022 at 11:02 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> > >
> >
> > Thanks for the suggestion, I have changed the patch as suggested.
> > Attached v16 patch has the changes for the same.
> >
>
> Thanks, I have one more comment.
>
> postgres=# Alter subscription sub1 add publication pub4;
> WARNING: publications "pub2", "pub4" do not exist in the publisher
> ALTER SUBSCRIPTION
>
> This gives additional publication in WARNING message which was not
> part of current command but is present from the earlier time.
>
> postgres=# Alter Subscription sub1 set publication pub5;
> WARNING: publication "pub5" does not exist in the publisher
> ALTER SUBSCRIPTION
>
> SET variant doesn't give such a problem.
>
> I feel we should be consistent here.

I have made the changes for this, attached v17 patch has the changes
for the same.

Regards,
Vignesh

Commits

  1. Raise a WARNING for missing publications.