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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Increase of buffers usage count by bgwriter


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
  • Cc: pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: Increase of buffers usage count by bgwriter
  • Date: Thu, 27 Oct 2005 13:09:12 -0400
  • Message-id: <22389(dot)1130432952(at)sss(dot)pgh(dot)pa(dot)us>

I wrote:
> ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp> writes:
>> I found that bgwriter increments usage count of buffers when it writes
>> the buffers. I feel this behavior is strange, because the behavior of
>> bgwriter will affect buffer management strategy.

> I think it might be sufficient to not increment usage_count when
> UnpinBuffer's "trashOK" parameter is false --- that's what
> SyncOneBuffer passes, so it'd fix the issue for bgwriter activity,
> and arguably all the other call sites that pass false also don't
> want the count to increment.

I've committed a change along this line.  Thanks for the suggestion!

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group