Re: One way replication in PostgreSQL

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: One way replication in PostgreSQL
Date: 2019-06-04 08:04:09
Message-ID: 8046afdf-698d-8f87-9be8-50f963df6079@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/6/19 10:02 π.μ., 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 ?

I'll describe our solution here, but its a far fetched approach, a diving into uncharted waters situation, but for us it was the only solution back in early 2000.
In one word : The long forgotten DBMirror (Mentioned during "Postgresql 11 : what's old" comments that followed the presentation in Lisbon pgconf2018.eu) . You can setup your triggers, produce your
SQL files, sent them to S whatever method you wish and run them without any connectivity from S to P.
Setting up is very easy. However you must be prepared to carry this as "technical debt" in future upgrades.
No Slony expert here, but in https://severalnines.com/blog/experts-guide-slony-replication-postgresql it is mentioned that you can ship in the form of SQL files as well. So you setup a slony slave
inside your P system and produce SQL files which you replay to your remote S, with no connectivity to 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
>

--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

In response to

Browse pgsql-general by date

  From Date Subject
Next Message paul.malm 2019-06-04 08:50:16 psql \copy
Previous Message Guillaume Lelarge 2019-06-04 07:33:43 Re: One way replication in PostgreSQL