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

Re: Seq scans status update

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Seq scans status update
Date: 2007-05-29 15:50:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Tom Lane wrote:
> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> > Is there a reason UnpinBuffer has to be the one to increment the usage count
> > anyways? Why can't ReadBuffer handle incrementing the count and just trust
> > that it won't be decremented until the buffer is unpinned anyways?
> That's a good question.  I think the idea was that if we hold a buffer
> pinned for awhile (long enough that the bgwriter's clock sweep passes
> over it one or more times), we want the usage count decrementing to
> start when we release the pin, not when we acquire it.  But maybe that
> could be fixed if the clock sweep doesn't touch the usage_count of a
> pinned buffer.  Which in fact it may not do already --- didn't look.

It does -- in BgBufferSync the "all" scan calls SyncOneBuffer with
skip_pinned=false.  The "lru" scan does skip pinned buffers.

Alvaro Herrera                          Developer,
"World domination is proceeding according to plan"        (Andrew Morton)

In response to


pgsql-patches by date

Next:From: Gregory StarkDate: 2007-05-29 16:41:09
Subject: Re: Concurrent psql patch
Previous:From: Zdenek KotalaDate: 2007-05-29 13:55:27
Subject: Re: [pgsql-patches] Ctid chain following enhancement

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