From: Michael Paquier <michael.paquier@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)
Date: Sun, 7 May 2017 21:38:05 +0900
Message-ID: <CAB7nPqRj5c2GSohUGDbd1bJjiLyWXq2_D_56tKB8uuCv_5UOJQ@mail.gmail.com> (raw)
In-Reply-To: <20170507000126.gnnifm7jywxc5eg6@alap3.anarazel.de>
References: <E1cK97K-0003Lh-E7@gemulon.postgresql.org>
<20170505012447.wsrympaxnfis6ojt@alap3.anarazel.de>
<20170507000126.gnnifm7jywxc5eg6@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
(catching up here)
On Sun, May 7, 2017 at 9:01 AM, Andres Freund <andres@anarazel.de> wrote:
> Turns out this isn't the better fix, because the checkpoint code
> compares with the actual record LSN (rather than the end+1 that
> XLogInsert() returns). We'd start having to do more bookkeeping or more
> complicated computations (subtracting the checkpoint record's size).
> Therefore I've pushed the simple fix mentioned above instead.
Yeah, I have spent some time looking at many details for this stuff...
And using a start LSN location was way easier for the checkpoint skip
checks. e6c44ee looks good to me, except that I would complete this
comment block in xlog.c:
* updated for all insertions, unless the XLOG_MARK_UNIMPORTANT flag
was
* set. lastImportantAt is never cleared, only overwritten by the LSN
of newer
* records. Tracking the WAL activity directly in WALInsertLock has
the
* advantage of not needing any additional locks to update the value.
*/
By just mentioning that the lastImportantAt is updated to the *start*
LSN position of an important record. This will help in avoiding future
confusions.
It turns out that fixing this issue only on HEAD has been a good choice.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-committers@postgresql.org
Cc: michael.paquier@gmail.com, andres@anarazel.de, pgsql-hackers@postgresql.org
Subject: Re: Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)
In-Reply-To: <CAB7nPqRj5c2GSohUGDbd1bJjiLyWXq2_D_56tKB8uuCv_5UOJQ@mail.gmail.com>
References: <E1cK97K-0003Lh-E7@gemulon.postgresql.org> <20170505012447.wsrympaxnfis6ojt@alap3.anarazel.de> <20170507000126.gnnifm7jywxc5eg6@alap3.anarazel.de> <CAB7nPqRj5c2GSohUGDbd1bJjiLyWXq2_D_56tKB8uuCv_5UOJQ@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