Re: Is it possible to replicate through an http proxy?
Justin <[email protected]> Tue, 14 Jan 2020 15:51:58 -0500
| Newsgroups | gmane.comp.db.postgresql.general |
|---|---|
| Message-ID | <CALL-XeMZRmvcfowZn1gPe+aGnWbEx==RdqBahVb1r7sVfJKfyg@mail.gmail.com> |
--000000000000f67261059c1fc390 Content-Type: text/plain; charset="UTF-8" Another solution to the problem instead of logical replication would be utilize wal_shipping and have the edge servers replay the wal using the restore_command The wal files can be downloaded from from HTTP server via a proxy and placed on the edge servers wal_archive directory to be replayed see https://www.postgresql.org/docs/12/runtime-config-wal.html#GUC-RESTORE-COMMAND and https://www.postgresql.org/docs/12/warm-standby.html this is twisting the warm_standby and restore functions into odd shapes This gives up the fine control that logical replication provides and its not as seamless On Tue, Jan 14, 2020 at 7:48 AM Iban Rodriguez <[email protected]> wrote: > Hi all, > > for a project we are working on we have the following requirements: > * PostgreSQL server on cloud > * Lot of edge devices that need access to DB > * Edges will only execute SELECT queries. No modification allowed on them. > * Internet access on edges can be lost and data must be accessible while > connection is reestablished. > > Our first approach to solve this was to setup a postgreSQL server on each > edge and configure a logical replication from cloud server. This way our > clients always connect to local server who automatically syncs with cloud > server while Internet connection is up and also automatically reconnects > when Internet connection is recovered after connection lost. > > However, we facing a new requirement that we do not know how to solve. > This requirement is that access to Internet from edge devices must be done > through a http proxy server. Reading documentation we have not been able to > find a way to create a replication with this limitation. The questions we > would like to ask are: > * Is it possible to create a logical replication with this limitation? > * Is there an alternative solution to our problem bearing in mind this > limitation? > > Thank you very much! > --000000000000f67261059c1fc390 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Another solution to the problem instead of logical re= plication would be utilize wal_shipping=C2=A0 and have the edge servers rep= lay the wal using the restore_command<br></div><div><br></div><div>The wal = files can be downloaded from from HTTP server via a proxy and placed on the= edge servers wal_archive directory to be replayed</div><div><br></div><div= >see<br></div><div><a href=3D"https://www.postgresql.org/docs/12/runtime-co= nfig-wal.html#GUC-RESTORE-COMMAND">https://www.postgresql.org/docs/12/runti= me-config-wal.html#GUC-RESTORE-COMMAND</a></div><div>and</div><div><a href= =3D"https://www.postgresql.org/docs/12/warm-standby.html">https://www.postg= resql.org/docs/12/warm-standby.html</a></div><div><br></div><div>this is tw= isting=C2=A0 the warm_standby and restore functions into odd shapes=C2=A0= =C2=A0 This=C2=A0 gives up=C2=A0 the fine control that logical replication = provides and its not as seamless <br></div></div><br><div class=3D"gmail_qu= ote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jan 14, 2020 at 7:48 AM = Iban Rodriguez <<a href=3D"mailto:[email protected]">[email protected]</= a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0p= x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><d= iv dir=3D"ltr"><div>Hi all,</div><div><br></div><div>for a project we are w= orking on we have the following requirements:</div><div>* PostgreSQL server= on cloud</div><div>* Lot of edge devices that need access to DB</div><div>= * Edges will only execute SELECT queries. No modification allowed on them.<= br></div><div>* Internet access on edges can be lost and data must be acces= sible while connection is reestablished.</div><div><br></div><div>Our first= approach to solve this was to setup a postgreSQL server on each edge and c= onfigure a logical replication from cloud server. This way our clients alwa= ys connect to local server who automatically syncs with cloud server while = Internet connection is up and also automatically reconnects when Internet c= onnection is recovered after connection lost.</div><div><br></div><div>Howe= ver, we facing a new requirement that we do not know how to solve. This req= uirement is that access to Internet from edge devices must be done through = a http proxy server. Reading documentation we have not been able to find a = way to create a replication with this limitation. The questions we would li= ke to ask are:</div><div>* Is it possible to create a logical replication w= ith this limitation?</div><div>* Is there an alternative solution to our pr= oblem bearing in mind this limitation?</div><div><br></div><div>Thank you v= ery much!<br></div></div> </blockquote></div> --000000000000f67261059c1fc390--