0

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?

1 Answers1

0

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.

Craig Ringer
  • 11,083
  • 9
  • 40
  • 61
  • Thanks. It works now. But now on querying SELECT * from pg_replication_slots;, the replication slot assigned to 1st slave shows inactive (f in active column). Any thoughts? @Craig – deepankardixit90 Dec 11 '15 at 13:17
  • It could see logs like requested WAL segment 000000010000000000000017 has already been removed in slave whose replication slot is inactive. Is it because of that? Will I need to take basebackup again? @Craig – deepankardixit90 Dec 11 '15 at 13:22