Re: Slave show ahead of the WAL error

From: Keith <keith(at)keithf4(dot)com>
To: Ankur Kaushik <ankurkaushik(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Slave show ahead of the WAL error
Date: 2016-08-11 13:23:29
Message-ID: CAHw75vu2dUOfwrhJbnWo9nhkTvTewgsppVoZfxTr-rMmPz8pcg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Aug 11, 2016 at 8:51 AM, Ankur Kaushik <ankurkaushik(at)gmail(dot)com>
wrote:

>
> I stopped the slave PostgreSQL
>
> apply
>
> mv recovery.conf recovery1.conf
>
> Started PostgreSQL
>
> Change pg_hba.conf added new IP
>
> Now
>
> mv recovery1.conf recovery.conf
>
> STARTED Slave Postgresql
>
>
> Now Error Showing on Slave
>
> < 2016-08-11 18:16:36.409 IST >LOG: started streaming WAL from primary at
> 5/E1000000 on timeline 1
> < 2016-08-11 18:16:36.409 IST >FATAL: could not receive data from WAL
> stream: ERROR: requested starting point 5/E1000000 is ahead of the WAL
> flush position of this server 5/E000EDD8
>
>
> Error Showing on Master
>
> < 2016-08-11 18:11:32.157 IST >LOG: replication connection authorized:
> user=repl
> < 2016-08-11 18:11:32.214 IST >ERROR: requested starting point 5/E1000000
> is ahead of the WAL flush position of this server 5/E0012708
>
>
>
>
The presence of the recovery.conf file is what tells postgresql the given
instance is a slave. When you started the slave without a valid
recovery.conf file, postgres likely made an assumption that it was no
longer a slave and put itself into a stand-alone mode. Normally you'd do
this by touching the failover file, so I'm really not sure what sort of
state you put postgres into when you did it this way. Then when you put the
recovery.conf back, it tries to treat that system as a slave, but is unable
to connect to the given master because it's no longer at a point where it
can pick up the WAL stream.

If all you're trying to do is add a new IP to the pg_hba.conf of the slave,
can you do that by editing the file while the database is running and
simply issuing a reload.

Keith

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mark Steben 2016-08-11 19:02:37 pg_upgrade question
Previous Message Ankur Kaushik 2016-08-11 12:51:26 Slave show ahead of the WAL error