I need to replicate only some of the tables from my Master Postgres.

With Google search, I got to know that it is possible with logical replication from Postgres10.

I already have a read-only replica and now I want to add another replica but with only selected Tables in that new replica.

   A--->B(normal replica with all data from A)
   |--->C(logical replica with only selected tables from A)

How do I configure this?

My master is set to wal_level = 'hot_standby'. B is my standby replica. Now I want to add a new replica C which should contain replicas of only selected tables.

Now, for C if I set wal_level=logical this will affect the A-B. The addition of C should not affect the current A-B setup.

  • 1
    The master must be set to logical. The WAL level on B or C is pretty much irrelevant for this setup. Your streaming replication is not affected from logical replication. This is all documented in the manual. Note that with 9.6 the level "hot_standby" was removed - it's still accepted, but is the same as replica. You shouldn't use hot_standby any more May 19 '21 at 6:45