Re: One way replication in PostgreSQL

From: Frank Alberto Rodriguez <franknigth(at)gmail(dot)com>
To: PALAYRET Jacques <jacques(dot)palayret(at)meteo(dot)fr>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: One way replication in PostgreSQL
Date: 2019-06-04 16:29:16
Message-ID: ced2456054c10adbf4adb8cdb83de4abfb8906f2.camel@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The FDW is a PostgreSQL extension to connect to other server from
PosgreSQL server inside, with this solution you only need connections
from P to S and no need a third server (external server), just use
triggers to push the INSERT/UPDATE/DELETE information you want to
replicate from P to S through Foreign Data Wrapper.
If you need integrity on the replicated information then I suggest to
use a control table to store the actions to replicate for the case when
it fails you can keep trying til the action succeeds.
Regards
On Tue, 2019-06-04 at 09:02 +0200, PALAYRET Jacques wrote:
> Hello,
>
> Thanks a lot for the suggested solutions.
>
> So, I can use WAL-shipping replication from Primary to the Secundary
> server, but it's only for full replication.
>
> Let's call " P " the provider/primary/master and " S " the
> subscriber/secundary/slave one.
> For partial replication (not all the tables), the solutions should
> use a third (intermediate / middle) server which could have both ways
> flow with the server P but only one way flow towards the server S.
> For example, a logical replication (pglogical or logical Postgresql
> replication) between server P and the middle server and then a WAL-
> shipping replication between middle server and server S.
> Is that right ?
>
> About the " FDW " solution in " an external server " (a middle one),
> is it possible to integrate the FDW in the P server to avoid the "
> external server " ?
>
> => What about the trigger-based replication systems like Slony or
> Londiste ; is it really necessary to have a connection or flow from
> the server S towards the server P ?
>
> Regards
> De: "PALAYRET Jacques" <jacques(dot)palayret(at)meteo(dot)fr>
> À: pgsql-general(at)lists(dot)postgresql(dot)org
> Envoyé: Lundi 3 Juin 2019 18:00:51
> Objet: One way replication in PostgreSQL
>
> Hello,
>
> If, for security reasons, I can't create a connection or a flow from
> subscriber/secundary/slave towards provider/primary/master, witch
> replication systems can I use ?
>
> If possible, I would prefer partial replication (only some tables) to
> full base replication (all instances).
>
> Do trigger-based replication systems (like Slony or Londiste or
> others) need a connection or flow from subscriber to the provider ?
>
> Thanks in advance
> ----- Météo-France -----
> PALAYRET JACQUES
> DCSC/MBD
> jacques(dot)palayret(at)meteo(dot)fr
> Fixe : +33 561078319

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Northcott 2019-06-04 16:54:55 Query very different speeds on seemingly similar data
Previous Message Matthias Apitz 2019-06-04 16:26:50 Re: Two small questions re/ COPY CSV data into table