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

From Amit Kapila
Subject Re: Logical Replication Custom Column Expression
Date
Msg-id CAA4eK1J-VtsJn1LSLTHbrVG0vWtpf0QA_-8W+JgLiq8GOeYWmA@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 Wed, Nov 23, 2022 at 1:40 AM Stavros Koureas
<koureasstavros@gmail.com> wrote:
>
> Reading more carefully what you described, I think you are interested in getting something you call origin from
publishers,probably some metadata from the publications. 
>
> This identifier in those metadata maybe does not have business value on the reporting side. The idea is to use a
valuewhich has specific meaning to the user at the end. 
>
> For example assigning 1 for tenant 1, 2 for tenant 2 and so one, at the end based on a dimension table which holds
thismapping the user would be able to filter the data. So programmatically the user can set the id value of the column
pluscreating the mapping table from an application let’s say and be able to distinguish the data. 
>

In your example, are different tenants represent different publisher
nodes? If so, why can't we have a predefined column and value for the
required tables on each publisher rather than logical replication
generate that value while replicating data?

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Logical Replication Custom Column Expression
Next
From: Greg Stark
Date:
Subject: Re: [PoC] configurable out of disk space elog level