Skip site navigation (1) Skip section navigation (2)

Re: Load Distributed Checkpoints, take 3

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Smith <gsmith(at)gregsmith(dot)com>, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Load Distributed Checkpoints, take 3
Date: 2007-06-26 14:42:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Tom Lane wrote:
> Anyway, if there are no XLOG records since the last checkpoint, there's
> probably nothing in shared buffers that needs flushing.  There might be
> some dirty hint-bits, but the only reason to push those out is to make
> some free buffers available, and doing that is not checkpoint's job (nor
> the all-buffers scan's job); that's what the LRU scan is for.

Yeah, except the LRU scan is not doing a very good job at that. It will 
ignore buffers with usage_count > 0, and it only scans 
bgwriter_lru_percent buffers ahead of the clock hand.

One pathological case is a COPY of a table slightly smaller than 
shared_buffers. That will fill the buffer cache. If you then have a 
checkpoint, and after that a SELECT COUNT(*), or a VACUUM, the buffer 
cache will be full of pages with just hint-bit-updates, but no WAL 
activity since last checkpoint.

But let's fix the LRU scan, rather work around it's deficiencies.

   Heikki Linnakangas

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2007-06-26 14:56:54
Subject: Re: Load Distributed Checkpoints, take 3
Previous:From: Tom LaneDate: 2007-06-26 14:00:36
Subject: Re: Load Distributed Checkpoints, take 3

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group