Re: Fix checkpoint skip logic on idle systems by tracking LSN progress

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, David Steele <david(at)pgmasters(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Subject: Re: Fix checkpoint skip logic on idle systems by tracking LSN progress
Date: 2016-12-22 16:32:56
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 2016-12-21 13:28:54 -0800, Andres Freund wrote:
> A mime-type of invalid/octet-stream? That's an, uh, odd choice.
> Working on committing this (tomorrow morning, not tonight). There's
> some relatively minor things I want to change:
> - I don't like the name XLogSetFlags() - it's completely unclear what
> that those flags refer to - it could just as well be replay
> related. XLogSetRecordFlags()?
> - Similarly I don't like the name "progress LSN" much. What does
> "progress" really mean in that". Maybe "consistency LSN"?
> - It's currently required to avoid triggering archive timeouts and
> checkpoints triggering each other, but I'm nervous marking all xlog
> switches as unimportant. I think it'd be better to only mark timeout
> triggered switches as such.

Here's an updated version of this. Besides the above (with "consistency
LSN" now named "lastImportantAt" instead of the previous
lastProgressAt), I changed how the skipping works in the bgwriter: I
don't see any need to involve the checkpoint location there. This also
allows to drop GetLastCheckpointPtr(). Besides that I did a fair amount
of comment-smithing.

I plan to commit this later today. Hope I got the reviewers roughly right.



Attachment Content-Type Size
0001-Skip-checkpoints-archiving-on-idle-systems.patch text/x-patch 25.6 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2016-12-22 16:49:30 Re: Transactions involving multiple postgres foreign servers
Previous Message Alvaro Herrera 2016-12-22 16:27:17 Re: patch: function xmltable