0

I have one slave server which used as a replication server (let's called it slave1) from several master servers.

The `slave1' server is set up to receive replication from several postgresql server, and I set it at multiple ports. The settings is like this:

Master1 port 5432 replicated to slave1 port 5432 Master2 port 5432 replicated to slave1 port 5433 etc.

Those server above (master1, master2, & slave1) are hosted at cloud.

all server using Postgresql-11 on Ubuntu 18.04.1 LTS

Is it possible to replicate my slave1 to my on premise server at office (called slave2), so that all databases on slave1 on all port is replicated to my slave2 on single port (port 5432 which is the default port of postgresql) ??

1 Answer 1

1

Using physical replication, no, that isn't possible. You would have to use the new-ish logical replication feature to consolidate the data from multiple clusters to one cluster.

2
  • thank you for the answer as I can begin to picture out the overall concepts. One thing though, why it needs to create a table on both server? so do I need to recreate all tables for all databases? Commented Jan 2, 2019 at 2:42
  • Logical replication comes with a lot of flexibility, but that flexibility has a cost--you have to configure it. Logical tables can have more columns than the originals, for example, so you need to create the tables to implement what you want. Maybe in the future they will add an optional feature to automatically create tables with identical columns, as a convenience.
    – jjanes
    Commented Jan 4, 2019 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.