Re: data transformation and replication

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: "Armand Pirvu (home)" <armand(dot)pirvu(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: data transformation and replication
Date: 2017-05-08 21:49:51
Message-ID: 4f641512-a681-ed08-4b62-4e16fad01df9@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/08/2017 12:46 PM, Armand Pirvu (home) wrote:
> Hi
>
> Here it is a scenario which I am faced with and I am hoping to find a pointer/tip/help
>
> db1 is the OLTP system
> db2 is the Reporting system
>
> The data from db1 needs to get to db2, but the database on those two have tables with different layout/structure and hence data will need to suffer some transformation in between in real time
>
> I was looking at something like
>
> db1 -> db2 replicates the same set of tables and with the same structures using pglogical for example
> db2.tbl1 -> db2.tbl2 data gets massages/transformed based on what replicates from db1.tbl1 using triggers and functions
>
>
> Other than that I reckon db1 -> db2 would be trigger based using something like slonik maybe (?) and data massage/transformation gets moved from db2 to db1 machine and then db1.tbl2 -> db2.tbl2 using pglogical

I was following you until the last part, "... moved from db2 to db1
machine and then db1.tbl2 -> db2.tbl2 ..."

Is this correct?

If so why db1 --> db2 --> db1 --> db2?

A complete answer is going to depend on at least an outline of what you
mean by massage/transform?

>
>
> Is this doable ? If so any pointers as to where to look about it ?
>
>
> Many thanks
> Armand
>
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Patrick B 2017-05-08 21:56:19 Select from tableA - if not exists then tableB
Previous Message Paul Hughes 2017-05-08 21:26:02 Python versus Other Languages using PostgreSQL