Re: Streaming replication - slave not getting promoted - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Streaming replication - slave not getting promoted
Date
Msg-id 54A94ED0.9070908@aklaver.com
Whole thread Raw
In response to Streaming replication - slave not getting promoted  (Jayadevan M <maymala.jayadevan@gmail.com>)
Responses Re: Streaming replication - slave not getting promoted
List pgsql-general
On 01/04/2015 06:09 AM, Jayadevan M wrote:
> Hi,
> 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
>
> Any suggestions?

Try pg_ctl promote on the standby server to see if it works at all:

http://www.postgresql.org/docs/9.3/interactive/app-pg-ctl.html

If it does then maybe your standby cannot 'see' the trigger file.

>
> One more doubt -
>
> In https://wiki.postgresql.org/wiki/Streaming_Replication, it says
> "
> # Note that recovery.conf must be in $PGDATA directory.
> # It should NOT be located in the same directory as postgresql.conf
> "
> postgresql.conf is in $PGDATA. So they will be in the same directory?
>
> Regards,
> Jayadevan
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Jayadevan M
Date:
Subject: Streaming replication - slave not getting promoted
Next
From: Andreas Kretschmer
Date:
Subject: Re: Streaming replication - slave not getting promoted