On Wed, Aug 13, 2014 at 2:32 AM, Andres Freund <and...@2ndquadrant.com>
> On 2014-08-06 15:42:08 +0530, Amit Kapila wrote:
> > On Tue, Aug 5, 2014 at 9:21 PM, Robert Haas <robertmh...@gmail.com>
> > > This essentially removes BgWriterDelay, but it's still mentioned in
> > BgBufferSync(). Looking further, I see that with the patch applied,
> > BgBufferSync() is still present in the source code but is no longer
> > from anywhere. Please don't submit patches that render things unused
> > without actually removing them; it makes it much harder to see what
> > changed. I realize you probably left it that way for testing purposes,
> > you need to clean such things up before submitting. Likewise, if you've
> > rendered GUCs or statistics counters removed, you need to rip them out,
> > that the scope of the changes you've made is clear to reviewers.
> FWIW, I found this email amost unreadable because it misses quoting
> signs after linebreaks in quoted content.
I think I have done something wrong while replying to Robert's
mail, the main point in that mail was trying to see if there is any
major problem incase we have separate process (bgreclaim) to
populate freelist. One thing which I thought could be problematic
is to put a buf in freelist which has usage_count as zero and is *dirty*.
Please do let me know if you want clarification for something in
Overall, the main changes required in patch as per above feedback
1. add an additional counter for the number of those
allocations not satisfied from the free list, with a
name like buffers_alloc_clocksweep.
2. Autotune the low and high threshold values for buffers
in freelist. In the patch, I have kept them as hard-coded
3. For populating freelist, have a separate process (bgreclaim)
instead of doing it by bgwriter.
There are other things also which I need to take care as per
feedback like some change in locking strategy and code.