"Greg Smith" <[EMAIL PROTECTED]> 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
> 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.
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not