Re: Column Filtering in Logical Replication

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Rahila Syed <rahilasyed90(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Column Filtering in Logical Replication
Date: 2021-09-07 05:00:18
Message-ID: CAA4eK1K_B-uk4ZxWa1g_69h-Mn-748vUZV2r9HUVrcQwq0+wmQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 6, 2021 at 9:25 PM Rahila Syed <rahilasyed90(at)gmail(dot)com> wrote:
>
> On Mon, Sep 6, 2021 at 8:53 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>
>
>> Did you give any thoughts to my earlier suggestion related to syntax [1]?
>>
>>
>> [1] - https://www.postgresql.org/message-id/CAA4eK1J9b_0_PMnJ2jq9E55bcbmTKdUmy6jPnkf1Zwy2jxah_g%40mail.gmail.com
>
>
> For future support to replicate all columns except (x,y,z), I think some optional keywords like
> COLUMNS NOT IN can be inserted between table name and (*columns_list*) as follows.
> ALTER PUBLICATION ADD TABLE tab_name [COLUMNS NOT IN] (x,y,z)
> I think this should be possible as a future addition to proposed syntax in the patch.
> Please let me know your opinion.
>

Right, I don't want you to implement that feature as part of this
patch but how about using COLUMNS or similar keyword in column filter
like ALTER PUBLICATION ADD TABLE tab_name COLUMNS (c1, c2, ...)? This
can make it easier to extend in the future.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2021-09-07 05:11:49 Re: Data loss when '"json_populate_recorset" with long column name
Previous Message Michael Paquier 2021-09-07 04:19:53 Re: [UNVERIFIED SENDER] Re: Challenges preventing us moving to 64 bit transaction id (XID)?