Re: Using old master as new replica after clean switchover

From: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
To: jgdr(at)dalibo(dot)com
Cc: michael(at)paquier(dot)xyz, pgsql-docs(at)lists(dot)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Using old master as new replica after clean switchover
Date: 2018-10-25 21:10:02
Message-ID: CANNMO+L1MtF3d-7y7pk6H5Wxt=G3ZRQn4QcNNQ0nS-713GxMCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On Thu, Oct 25, 2018 at 6:03 AM Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>
wrote:

> What about logging the shutdown checkpoint on the old master?
> On the standby side, we could cross-check it with a function confirming:
> 1/ the very last XLogRecord received was the old master shutdown checkpoint
> 2/ the received shutdown checkpoint has the same LSN
>

Additionally, the new instructions in the doc might include recommendation,
what to do if we
found that shutdown checkpoint wasn't received and replayed by the
replica-to-promote. From my
understanding, before promotion, we could "manually" transfer missing WAL
data from the old,
inactive master and replay it on the replica-to-promote (of course, if
recovery_command is
properly configured on it). Right?

By the way, if it looks to me that it might be better to write more than
just few sentences, what if it
will be a new chapter – say, "Switchover", next to "Failover". It would
also give better understanding
to the reading, explicitly distinguishing planned and unplanned processes
of master/replica role
changes.

Regards,
Nik

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Daniel Gustafsson 2018-10-26 13:27:28 Missing whitespace in pg_dump docs
Previous Message Jehan-Guillaume de Rorthais 2018-10-25 13:03:51 Re: Using old master as new replica after clean switchover

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2018-10-25 21:19:09 Re: [HACKERS] advanced partition matching algorithm for partition-wise join
Previous Message Alvaro Herrera 2018-10-25 20:26:22 Re: ATTACH/DETACH PARTITION CONCURRENTLY