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 1hYCJX-0001rX-Ec for pgsql-general@arkaria.postgresql.org; Tue, 04 Jun 2019 16:29:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hYCJV-0007Ct-9c for pgsql-general@arkaria.postgresql.org; Tue, 04 Jun 2019 16:29:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYCJU-0007Cl-Tq for pgsql-general@lists.postgresql.org; Tue, 04 Jun 2019 16:29:29 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYCJN-0005wG-Mc for pgsql-general@lists.postgresql.org; Tue, 04 Jun 2019 16:29:28 +0000 Received: by mail-oi1-x22f.google.com with SMTP id q186so16066032oia.0 for ; Tue, 04 Jun 2019 09:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:in-reply-to:references:mime-version; bh=/HScDRLau6oDARpMmAx6veZ9iYdrl4V+3SSThYzRhQ8=; b=JHYxg9cthp0fC6WN7gJqaZv1ukt3nZCvtDP5/F1+3yHq/sDUzA35/dGaEpIVZQq98C ViPz0t/DAOyBe7zO54M0641kwjfoFOwMkbbFzbXtpLiJz28t5SWBa5kmI0rXzzYv0Zlk w6VSTDs0SOjWQTLAA1q7ykFnZMDCUef6iRhMVz/dikkJeICSvqW+lup3gnY086V/k1K/ sosdtLJYitGUJ2stIhoipAu9s0UFsCCAEKjQoPtwIGU5t0QNArYA2Bxr3JHSv0l1zk+o CZFILMSapdx6+gJCSG9eC+FJh88UbTQDDN2zQPW8JkFXbIuq71rVn0jiMs8uEsZhhOKc oAYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:mime-version; bh=/HScDRLau6oDARpMmAx6veZ9iYdrl4V+3SSThYzRhQ8=; b=HL0hMZ8wAn6iPIiM+t52q/3Zk/Qo4pwAweQSYBdsRwgl4BddB87f9IEe14mBzRK5tb Gv36SVLgLG3gYGpI4q9FFEEZ5mgFa07HS20ld4oxGWepdxC3mmOaoYHmL/JXxNNtd/e9 XHLbWglv09dgqwr/8Gyf1BZrDMWQUC+UMln8lltvKY11DuKIYds2sT3CazNC8v14QaP2 xXrQmpRzAWRhjfFGYwHAQRsZRZHwzGvuvkOTbIXIg4CKBmoXea43Hkmf/DkfnyUkvp+n VdpyZr3f7FqnbEPPUeST34nTyT+Owhl/vPHWgPwU2kTCxacl/T7+Jj7XA5583Ju3Uiud ZIfw== X-Gm-Message-State: APjAAAWSjHYtwG/VNPIhvF15Cc2nsBjCImXPKcmIwh2blCqv8+CZaujk DKoAk2h8GMYnBqTfwRORP0o= X-Google-Smtp-Source: APXvYqxkqwqSe4bPGkt35DQsvZKWWbBOONqfxe20wRuO110KF0HJfteAjdO1kVdTVnHdAO0oAxlHOA== X-Received: by 2002:aca:4d8:: with SMTP id 207mr4948984oie.88.1559665758503; Tue, 04 Jun 2019 09:29:18 -0700 (PDT) Received: from frodriguez-HP-Notebook ([189.208.128.209]) by smtp.googlemail.com with ESMTPSA id c7sm6635267oia.47.2019.06.04.09.29.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2019 09:29:17 -0700 (PDT) Message-ID: Subject: Re: One way replication in PostgreSQL From: Frank Alberto Rodriguez To: PALAYRET Jacques , pgsql-general@lists.postgresql.org Date: Tue, 04 Jun 2019 16:29:16 +0000 In-Reply-To: <573925547.9500307.1559631765591.JavaMail.zimbra@meteo.fr> References: <1327243218.9378445.1559577651466.JavaMail.zimbra@meteo.fr> <573925547.9500307.1559631765591.JavaMail.zimbra@meteo.fr> Content-Type: multipart/alternative; boundary="=-Pncstt/PK/8Tbd1RzG1L" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-Pncstt/PK/8Tbd1RzG1L Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 8bit 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" > À: 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 --=-Pncstt/PK/8Tbd1RzG1L Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
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, PALAY= RET Jacques wrote:
= Hello,

Thanks a lot for the suggested solutions.

So, I can us= e WAL-shipping replication from Primary to the Secundary server, but it's o= nly for full replication.

Let's call " P " the provider/primary/mast= er  and " S " the subscriber/secundary/slave one.
For partial repli= cation (not all the tables), the solutions should use a third (intermediate= / middle) server which could have both ways flow with the server P but onl= y one way flow towards the server S.
For example, a logical replication = (pglogical or logical Postgresql replication) between server P and the midd= le server and then a WAL-shipping replication between middle server and ser= ver S.
Is that right ?

About the " FDW " solution in " an externa= l server " (a middle one), is it possible to integrate the FDW in the P ser= ver to avoid the " external server " ?

=3D> What about the trigge= r-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 ?
<= br>Regards

De: "PALAYRET Jacques" <jacques.palayret@m= eteo.fr>
=C3=80: pgsql-general@lists.postgresql.org
Envo= y=C3=A9: Lundi 3 Juin 2019 18:00:51
Objet: One way replicatio= n in PostgreSQL

Hello,

If, for security reasons, I can't create a con= nection or a flow from subscriber/secundary/slave towards provider/primary/= master, witch replication systems can I use ?

If possible, I wo= uld 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 provi= der ?

Thanks in advance
----- M=C3=A9t= =C3=A9o-France -----
PALAYRET JACQUES
DCSC/MBD
jacques.palayret@m= eteo.fr
Fixe : +33 561078319

--=-Pncstt/PK/8Tbd1RzG1L--