PostgreSQL – Do Streaming Replication Slots Need to Match the Number of Replicas?

master-slave-replicationpostgresql-9.6replication

Correct me if I am wrong but I’m thinking that if I have 4 different read only replica servers I need 4 streaming replication slots, one for each of them?
Or all of them can you use one?

Best Answer

Each replication slot requires a unique primary_slot_name in the recovery.conf, so you will need to have 4 connections for a streaming replication slot.