"Greg Smith" <gsmith(at)gregsmith(dot)com> writes:
> I'm mostly done with my review of the "Automatic adjustment of
> bgwriter_lru_maxpages" patch. In addition to issues already brought up with
> that code, there are some small things that need to be done to merge it with
> the recent pg_stat_bgwriter patch, and I have some concerns about its unbounded
> scanning of the buffer pool; I'll write that up in more detail or just submit
> an improved patch as I get time this week.
I had a thought on this. Instead of sleeping for a constant amount of time and
then estimating the number of pages needed for that constant amount of time
perhaps what bgwriter should be doing is sleeping for a variable amount of
time and estimating the length of time it needs to sleep to arrive at a
constant number of pages being needed.
The reason I think this may be better is that "what percentage of the shared
buffers the bgwriter allows to get old between wakeups" seems more likely to
be a universal constant that people won't have to adjust than "fixed time
interval between bgwriter cleanup operations".
Just a thought.
In response to
pgsql-hackers by date
|Next:||From: Gregory Stark||Date: 2007-04-18 17:46:14|
|Subject: Re: Backend Crash|
|Previous:||From: Tom Lane||Date: 2007-04-18 17:26:45|
|Subject: Re: [RFC] PostgreSQL Access Control Extension (PGACE) |