Answer the question
In order to leave comments, you need to log in
How to organize synchronous PostgreSQL database replication on geographically remote servers?
Good afternoon!
I must say right away that I am new to PostgreSQL.
There are 2 remote servers with PostgreSQL on board. The local addresses are different (192.168.1.x and 192.168.100.y), but they see each other through the l2tp tunnel + IPsec.
It is necessary to make sure that when writing to one database, the same record is replicated to another database.
Schematic representation of the structure:
How will it be more convenient to implement it?
Answer the question
In order to leave comments, you need to log in
Get it and set it up.
According to the network settings - any perversions, as long as you have an open tcp port (the one on which the master listens, usually 5432) from the replica to the master.
Synchronous_standby_names is responsible for synchronous replication when synchronous_commit is enabled
Note that synchronous replication with geographic distribution is a pain . It's in bold type. Both in terms of performance and stability of work on writing data - if there is a little something with the network, then the leading database will not write anything until you fix the network. Because synchronous replication.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question