Re: Added schema level support for publication. - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Added schema level support for publication.
Date
Msg-id CAA4eK1+14L-ynXKV5tvWEK2L8PPRuyTd0goPyC6eu=H7ham=ww@mail.gmail.com
Whole thread Raw
In response to Re: Added schema level support for publication.  (Greg Nancarrow <gregn4422@gmail.com>)
List pgsql-hackers
On Fri, Oct 22, 2021 at 11:59 AM Greg Nancarrow <gregn4422@gmail.com> wrote:
>
> On Fri, Oct 22, 2021 at 12:41 PM Greg Nancarrow <gregn4422@gmail.com> wrote:
> >
> > I was also previously concerned about what the behavior should be when
> > only including just the partitions of a partitioned table in a
> > publication using ALL TABLES IN SCHEMA and having
> > publish_via_partition_root=true. It seems to implicitly include the
> > partitioned table in the publication. But I did some testing and found
> > that this is the current behavior when only the partitions are
> > individually included in a publication using TABLE, so it seems to be
> > OK.
> >
>
> Thinking some more about this, it still may still be confusing to the
> user if not explicitly stated in the ALL TABLES IN SCHEMA case.
> How about adding some additional explanation to the end of the
> following paragraph:
>
> +     <para>
> +      When a partitioned table is published via schema level publication, all
> +      of its existing and future partitions irrespective of it being from the
> +      publication schema or not are implicitly considered to be part of the
> +      publication. So, even operations that are performed directly on a
> +      partition are also published via publications that its ancestors are
> +      part of.
> +     </para>
>
> Something like:
>
> Similarly, if a partition is published via schema level publication
> and publish_via_partition_root=true, the parent partitioned table is
> implicitly considered to be part of the publication, irrespective of
> it being from the publication schema or not.
>

I don't think we need to explicitly mention this in docs as this is
quite similar to what is happening for the "For Table" case as well
and it seems to be clarified by "publish_via_partition_root"
definition in Create Publication docs [1].

[1] - https://www.postgresql.org/docs/devel/sql-createpublication.html

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats().
Next
From: Jeff Davis
Date:
Subject: Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats().