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

Increase of buffers usage count by bgwriter

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Increase of buffers usage count by bgwriter
Date: 2005-10-26 05:48:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hi Hackers,

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.
When backends write LRU dirty buffers, they are replaced immediately.
However, when bgwriter writes dirty buffer, the replacement is postponed
until the next rotation of CLOCK.

If the behavior is not intended, another UnpinBuffer that doesn't
increase the buffers usage count will be needed.
Otherwise, bgwriter should do behavior that looks like VACUUM, 
using StrategyHintVacuum(true).

I'll appreciate any comments.
ITAGAKI Takahiro
NTT Cyber Space Laboratories


pgsql-hackers by date

Next:From: Tom LaneDate: 2005-10-26 05:56:01
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Previous:From: Christopher Kings-LynneDate: 2005-10-26 05:45:49
Subject: PQescapeIdentifier

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