Re: Added schema level support for publication.

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Greg Nancarrow <gregn4422(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Subject: Re: Added schema level support for publication.
Date: 2021-08-10 11:24:12
Message-ID: CAA4eK1JcXG3stqncfB6BjcXW+ao1vg=5q6YJsvjDoY=+AvT1Lw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 9, 2021 at 11:31 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Fri, Aug 6, 2021 at 2:00 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
> > ---
> > Suppose that a parent table and its child table are defined in
> > different schemas, there is a publication for the schema where only
> > the parent table is defined, and the subscriber subscribes to the
> > publication, should changes for its child table be replicated to the
> > subscriber?
>
> I felt that in this case only the table data that is present in the
> publish schema should be sent to the subscriber. Since the child table
> schema is not part of the publication, I felt this child table data
> should not be replicated.
>

But, as point out by Sawada-San, the same is true for FOR TABLE case.
I think we should be consistent here and should publish the data for
the child table if the parent table's schema is published.

> I have kept the above same behavior in the case of publication created
> using PUBLISH_VIA_PARTITION_ROOT option i.e the child table data will
> not be sent. But now I'm feeling we should send the child table data
> since it is being sent through the parent table which is part of the
> publication. Also this way users can use this option if the user has
> the table having partitions designed across the schemas.
>

This sounds fine to me.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Drouvot, Bertrand 2021-08-10 11:59:57 Re: [bug] Logical Decoding of relation rewrite with toast does not reset toast_hash
Previous Message Ranier Vilela 2021-08-10 11:21:36 Re: Bug in huge simplehash