Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hY4Qk-0000nS-BD for pgsql-general@arkaria.postgresql.org; Tue, 04 Jun 2019 08:04:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hY4Qg-0007Rt-SE for pgsql-general@arkaria.postgresql.org; Tue, 04 Jun 2019 08:04:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hY4Qg-0007Md-C8 for pgsql-general@lists.postgresql.org; Tue, 04 Jun 2019 08:04:22 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hY4Qc-0001cd-Eg for pgsql-general@lists.postgresql.org; Tue, 04 Jun 2019 08:04:21 +0000 Received: from smadev.internal.net (pc131.internal.net [10.9.200.131]) by hermes.gatewaynet.com (8.15.2/8.15.2/Debian-8) with ESMTPS id x5484926021977 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 4 Jun 2019 11:04:14 +0300 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id x54849WL013324 for ; Tue, 4 Jun 2019 11:04:09 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: One way replication in PostgreSQL To: pgsql-general@lists.postgresql.org References: <1327243218.9378445.1559577651466.JavaMail.zimbra@meteo.fr> <573925547.9500307.1559631765591.JavaMail.zimbra@meteo.fr> From: Achilleas Mantzios Message-ID: <8046afdf-698d-8f87-9be8-50f963df6079@matrix.gatewaynet.com> Date: Tue, 4 Jun 2019 11:04:09 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: <573925547.9500307.1559631765591.JavaMail.zimbra@meteo.fr> Content-Type: multipart/alternative; boundary="------------55B82EB22553B9AF866A8EFF" Content-Language: en-US X-Virus-Scanned: clamav-milter 0.100.3 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-28.4 required=5.0 tests=ALL_TRUSTED,DYN_HAM_COORD, DYN_HAM_IT,DYN_HAM_NAUTICAL,DYN_HAM_SHORT_BODY,DYN_HAM_SIGNAT1, HTML_MESSAGE,TW_PG autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------55B82EB22553B9AF866A8EFF Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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" > *À: *pgsql-general@lists.postgresql.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.palayret@meteo.fr > Fixe : +33 561078319 > -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt --------------55B82EB22553B9AF866A8EFF Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
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.palayret@meteo.fr>
À: pgsql-general@lists.postgresql.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.palayret@meteo.fr
Fixe : +33 561078319



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