Re: Added schema level support for publication.

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Added schema level support for publication.
Дата
Msg-id CAA4eK1KRiouV6fguf=yy+soBgKCtUqQZMOJgZ-7gJq2TumXyBQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Added schema level support for publication.  (Greg Nancarrow <gregn4422@gmail.com>)
Ответы Re: Added schema level support for publication.  (Greg Nancarrow <gregn4422@gmail.com>)
Список pgsql-hackers
On Wed, Oct 13, 2021 at 1:40 PM Greg Nancarrow <gregn4422@gmail.com> wrote:
>
> On Wed, Oct 13, 2021 at 12:15 AM vignesh C <vignesh21@gmail.com> wrote:
> >
> > Attached v40 patch has the fix for the above comments.
> >
>
> [Maybe this has some overlap with what Hou-san reported, and I have
> not tested this against his proposed fixes]
>
> If partitions belong to a different schema than the parent partitioned
> table, then the current patch implementation allows the partitions to
> (optionally) be explicitly added to a publication that includes the
> parent partitioned table (and for the most part, it doesn't seem to
> make any difference to the publication behavior). Should this be
> allowed?
>
> e.g.
>
> CREATE SCHEMA sch;
> CREATE SCHEMA sch1;
> CREATE TABLE sch.sale (sale_date date not null, country_code text,
> product_sku text, units integer) PARTITION BY RANGE (sale_date);
> CREATE TABLE sch1.sale_201901 PARTITION OF sch.sale FOR VALUES FROM
> ('2019-01-01') TO ('2019-02-01');
> CREATE TABLE sch1.sale_201902 PARTITION OF sch.sale FOR VALUES FROM
> ('2019-02-01') TO ('2019-03-01');
>
> postgres=# CREATE PUBLICATION pub FOR ALL TABLES IN SCHEMA sch, TABLE
> sch1.sale_201901, TABLE sch1.sale_201902;
> CREATE PUBLICATION
> postgres=# \dRp+
>                              Publication pub
>  Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root
> -------+------------+---------+---------+---------+-----------+----------
>  gregn | f          | t       | t       | t       | t         | f
> Tables:
>     "sch1.sale_201901"
>     "sch1.sale_201902"
> Tables from schemas:
>     "sch"
>

I don't see any problem with this. Do you have a specific problem in
mind due to this?

-- 
With Regards,
Amit Kapila.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Sadhuprasad Patro
Дата:
Сообщение: Fwd: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber
Следующее
От: Gilles Darold
Дата:
Сообщение: [PATCH] Proposal for HIDDEN/INVISIBLE column