I have a Postgres (version – 9.5 Beta) server replication set up where there are 3 slaves and a primary server. After all required configuration is done, I start 1st slave after taking base backup and it gets started. As I start 2nd slave, it does not start. Here is the log that I get repeatedly –
FATAL: could not start WAL streaming: ERROR: replication slot "abcdef" is already active for PID 5368
The same happens on trying to start 3rd slave. Server won't start giving same logs.
Any thoughts?
Best Answer
It sounds like you've set
primary_slot_name
to the same slot in all three replicas.Each replica must use a different replication slot in
recovery.conf
if you're going to use replication slots for streaming replication. Use of a replication slot is not required if you're using streaming replication with WAL archive based fallback.