Column Filtering in Logical Replication

Поиск
Список
Период
Сортировка
От Rahila Syed
Тема Column Filtering in Logical Replication
Дата
Msg-id CAH2L28vddB_NFdRVpuyRBJEBWjz4BSyTB=_ektNRH8NJ1jf95g@mail.gmail.com
обсуждение исходный текст
Ответы Re: Column Filtering in Logical Replication  (Dilip Kumar <dilipbalaut@gmail.com>)
Re: Column Filtering in Logical Replication  (vignesh C <vignesh21@gmail.com>)
Re: Column Filtering in Logical Replication  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: Column Filtering in Logical Replication  (Peter Smith <smithpb2250@gmail.com>)
Re: Column Filtering in Logical Replication  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: Column Filtering in Logical Replication  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: Column Filtering in Logical Replication  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Hi,

Filtering of columns at the publisher node will allow for selective replication of data between publisher and subscriber.  In case the updates on the publisher are targeted only towards specific columns, the user will have an option to reduce network consumption by not sending the data corresponding to new columns that do not change. Note that replica identity values will always be sent irrespective of column filtering settings. The column values that are not sent by the publisher will be populated using local values on the subscriber. For insert command, non-replicated column values will be NULL or the default. 
If column names are not specified while creating or altering a publication,
all the columns are replicated as per current behaviour.

The proposal for syntax to add table with column names to publication is as follows:
Create publication:

CREATE PUBLICATION <pub_name> [ FOR TABLE [ONLY] table_name [(colname [,…])] | FOR ALL TABLES]


Alter publication:

ALTER PUBLICATION <pub_name> ADD TABLE [ONLY] table_name [(colname [, ..])] 


Please find attached a patch that implements the above proposal.

While the patch contains basic implementation and tests, several improvements 
and sanity checks are underway. I will post an updated patch with those changes soon.

Kindly let me know your opinion.


Thank you,

Rahila Syed




Вложения

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

Предыдущее
От: Alexander Pyhalov
Дата:
Сообщение: Re: Partitioned index can be not dumped
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Make jsonapi usable from libpq