From: Michael Paquier <michael.paquier@gmail.com>
To: bret.shao@outlook.com
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14803: use receiverPtr as the endptr to call KeepLogSeg(endptr, &_logSegNo) in CreateRestartPoint
Date: Fri, 8 Sep 2017 16:32:18 +0900
Message-ID: <CAB7nPqS-RsyiwvPywrOyuMpM-DhqUoo0ynuNGTLOY3M0uMnbsQ@mail.gmail.com> (raw)
In-Reply-To: <20170907051056.25634.72330@wrigleys.postgresql.org>
References: <20170907051056.25634.72330@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On Thu, Sep 7, 2017 at 2:10 PM, <bret.shao@outlook.com> wrote:
> when call KeepLogSeg to get the oldest xlog file in function
> CreateRestartPoint,
> I think the endptr shoule be the repalyPtr not the later one of receiverPtr
> and replayPtr.
> endptr = (receivePtr < replayPtr) ? replayPtr : receivePtr;
>
> Because that if the endptr is the receiverPtr, it means that may be the xlog
> file that is being redo will be dropped.
There are timeline-related things to consider, in short when doing a
timeline jump you may finish with a segment that you did not expect to
be recycled. See the link to the discussion and the commit in
question:
https://www.postgresql.org/message-id/50D30851.2030509%40vmware.comhttp://git.postgresql.org/pg/commitdiff/af275a12dfeecd621ed9899a9382f26a68310263
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: michael.paquier@gmail.com, bret.shao@outlook.com
Subject: Re: BUG #14803: use receiverPtr as the endptr to call KeepLogSeg(endptr, &_logSegNo) in CreateRestartPoint
In-Reply-To: <CAB7nPqS-RsyiwvPywrOyuMpM-DhqUoo0ynuNGTLOY3M0uMnbsQ@mail.gmail.com>
References: <20170907051056.25634.72330@wrigleys.postgresql.org> <CAB7nPqS-RsyiwvPywrOyuMpM-DhqUoo0ynuNGTLOY3M0uMnbsQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox