I have streaming replication set up, with PostgreSQL 9.3. The entries in recovery.conf on the slave are as follows - standby_mode = 'on' primary_conninfo = 'host=127.0.0.1 port=2345 user=postgres password=password' restore_command = 'cp /pgdata/archive/%f "%p"' trigger_file = ‘/tmp/down.trg’
In postgresql.conf on the slave, I have set hot_standby = on
Replication is working fine. The trigger file does get created by the failover script when I shut down the primary. But I just keep getting these entries in the log file in the slave and it does not get promoted. FATAL: could not connect to the primary server: could not connect to server: Connection refused