Re: Streaming replication, master recycling

From: <fredrik(at)huitfeldt(dot)com>
To: "Venkata Balaji N" <nag1010(at)gmail(dot)com>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Streaming replication, master recycling
Date: 2016-05-11 11:04:19
Message-ID: 1462964659750.39112.27240@webmail5
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I apologise for the missing data.

we are running 9.1.15 on debian servers.

when we promote the old slave, it seems to go fine. Are you saying that it will cause issues down the line if the previous master is not shut down before promoting?

I was actually more concerned with the fact that we (some times) recycle the old master without doing a full basebackup. Again, this seems to work, but this presentation seems to indicate that this can cause problems (while seeming to work): <http://hlinnaka.iki.fi/presentations/NordicPGDay2015-pg_rewind.pdf>

The note is on page 14, under the headline: "Naive approach".

thank you for your support,

Fredrik
On 11 May 2016 at 12:47:13 +02:00, Venkata Balaji N <nag1010(at)gmail(dot)com> wrote:

>
>
> On Wed, May 11, 2016 at 2:31 PM, <<fredrik(at)huitfeldt(dot)com>> wrote:
>
> > Hi All,
> >
> > we are currently using streaming replication on multiple node pairs. We are seeing some issues, but I am mainly interrested in clarification.
> >
> > When a failover occurs, we touch the trigger file, promoting the previous slave to master. That works perfectly.
> >
> > For recycling the previous master, we create a recovery.conf (with recovery_target_timeline = 'latest') and *try* to start up. If postgresql starts up, we accept it as a new slave. If it does not, we proceed with a full basebackup.
> >
> Which version of postgresql you are using ?
>
> You need to shutdown master first, then promote slave and then other way round, but, this can be clarified only if you let us know the postgresql version. This is quite tricky in 9.2.x and from 9.3.x.
>
> Regards,
> Venkata B N
>
> Fujitsu Australia
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sameer Kumar 2016-05-11 11:36:49 Re: Streaming replication, master recycling
Previous Message Venkata Balaji N 2016-05-11 10:47:13 Re: Streaming replication, master recycling