Re: Logical Replication Custom Column Expression - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Logical Replication Custom Column Expression
Date
Msg-id CAExHW5u9180s_J6bX1R9=+TEASiRffgKwf-+waKhjpGRM6EeSA@mail.gmail.com
Whole thread Raw
In response to Re: Logical Replication Custom Column Expression  (Stavros Koureas <koureasstavros@gmail.com>)
Responses Re: Logical Replication Custom Column Expression
List pgsql-hackers
On Fri, Nov 25, 2022 at 4:13 PM Stavros Koureas
<koureasstavros@gmail.com> wrote:
>
> Yes, if the property is on the subscription side then it should be applied for all the tables that the connected
publicationis exposing.
 
> So if the property is enabled you should be sure that this origin column exists to all of the tables that the
publicationis exposing...
 
>

That would be too restrictive - not necessarily in your application
but generally. There could be some tables where consolidating rows
with same PK from different publishers into a single row in subscriber
would be desirable. I think we need to enable the property for every
subscriber that intends to add publisher column to the desired and
subscribed tables. But there should be another option per table which
will indicate that receiver should add publisher when INSERTING row to
that table.


> Sure this is the complete idea, that the subscriber should match the PK of origin, <previous_pkey>
> As the subscription table will contain same key values from different origins, for example:
>

And yes, probably you need to change the way you reply to email on
this list. Top-posting is generally avoided. See
https://wiki.postgresql.org/wiki/Mailing_Lists.

-- 
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Julien Tachoires
Date:
Subject: Re: SUBTRANS: Minimizing calls to SubTransSetParent()
Next
From: Chris Travers
Date:
Subject: Re: Add 64-bit XIDs into PostgreSQL 15