Re: row filtering for logical replication

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: row filtering for logical replication
Дата
Msg-id CAA4eK1+P5njfqa-4BgpDy4cX02x87gkWPVCsbbfov3_FHm9YSg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: row filtering for logical replication  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On Sat, Jan 22, 2022 at 8:45 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2022-Jan-22, Amit Kapila wrote:
>
> > CREATE TABLE parent (a int primary key, b int not null, c varchar)
> > PARTITION BY RANGE(a);
> > CREATE TABLE child PARTITION OF parent FOR VALUES FROM (0) TO (250);
> > CREATE UNIQUE INDEX b_index on child(b);
> > ALTER TABLE child REPLICA IDENTITY using INDEX b_index;
> >
> > In this, the parent table's replica identity is the primary
> > key(default) and the child table's replica identity is the b_index.
>
> Why is the partition's replica identity different from its parent's?
> Does that even make sense?
>

Parent's RI doesn't matter as we always use a child's RI, so one may
decide not to have RI for a parent. Also, when replicating, the user
might have set up the partitioned table on the publisher-side and
non-partitioned tables on the subscriber-side in which case also there
could be different RI keys on child tables.

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Skipping logical replication transactions on subscriber side
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Skipping logical replication transactions on subscriber side