2
votes

I am in the process of setting up PostgreSQL 9.6 replication and I'm looking for the best way (PostgreSQL built-in option of 3rd party) to handle my situation.

  1. I will have one master that will contain a certain set of tables & data that need to be replicated to several slaves.

  2. The data on the master can only be updated at the master.

  3. Each slave will contain the replicated tables and data, but will also need to hold various tables and data specific to that site.

  4. The site specific data will not be replicated.

TIA for your suggestions.

1
Maybe not replicating and using foreign tables to access the master tables from the slaves is good enough? - a_horse_with_no_name
I'd agree that this doesn't really sound like replication. And if it is, it's definitely partial logical replication.. if it were me, I'd have an entire cluster for the replicated stuff, and another cluster for the non-shared stuff. - Joe Love

1 Answers

4
votes

You want to use the logical replication in PostgreSQL 10, which will be released very soon. A release candidate is available now.

The new logical replication will easily allow you to replicate only the tables you want to all the followers, while letting each follower have its own local tables. Binary replication (the only kind through version 9.6) does not permit this.