Re: Logical Replication Custom Column Expression

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Stavros Koureas <koureasstavros(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Logical Replication Custom Column Expression
Date: 2022-11-23 03:19:24
Message-ID: CAA4eK1J-VtsJn1LSLTHbrVG0vWtpf0QA_-8W+JgLiq8GOeYWmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 23, 2022 at 1:40 AM Stavros Koureas
<koureasstavros(at)gmail(dot)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 value which 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 this mapping the user would be able to filter the data. So programmatically the user can set the id value of the column plus creating 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2022-11-23 03:50:19 Re: [PoC] configurable out of disk space elog level
Previous Message Amit Kapila 2022-11-23 03:11:33 Re: Logical Replication Custom Column Expression