Re: pg_stop_backup(wait_for_archive := true) on standby server

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_stop_backup(wait_for_archive := true) on standby server
Date: 2017-07-07 08:06:04
Message-ID: CAD21AoCjSb2ftptYLjF0Pv=0oxQFxzqG5zPz+h-4Nt85Fwgm5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 7, 2017 at 4:21 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Fri, Jul 7, 2017 at 4:06 PM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>> I agree with this idea. I've tried to make it wait for archiving but
>> it seems to me that there are other two issues we need to deal with:
>> the timeline ID on standby server is always reset after created a
>> restart point, and ThisTimeLineID variable of a backend process is not
>> set on the standby node when initializing. The former would be easy to
>> fix because resetting it is for debugging purposes. However, to deal
>> with latter issue, I'm considering the influence on other things.
>
> ThisTimeLineID does not need to be touched. It seems to me that you
> should just use the wait timeline as minRecoveryPointTLI, and wait for
> segments using this value. The segment and backup history files to
> wait for should be defined with minRecoveryPoint.

Thank you for the advise. I'll post the patch later.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-07-07 08:22:58 Re: [HACKERS] Postgres process invoking exit resulting in sh-QUIT core
Previous Message Michael Banck 2017-07-07 07:54:11 Re: New partitioning - some feedback