On Mon, Sep 3, 2012 at 7:15 AM, Amit kapila <amit.kapila@huawei.com> wrote:
> This patch is based on below Todo Item:
>
> Consider adding buffers the background writer finds reusable to the free
> list
>
>
>
> I have tried implementing it and taken the readings for Select when all the
> data is in either OS buffers
>
> or Shared Buffers.
>
>
>
> The Patch has simple implementation for "bgwriter or checkpoint process
> moving the unused buffers (unpinned with "ZERO" usage_count buffers) into
> "freelist".
I don't think InvalidateBuffer can be safely used in this way. It
says "We assume
that no other backend could possibly be interested in using the page",
which is not true here.
Also, do we want to actually invalidate the buffers? If someone does
happen to want one after it is put on the freelist, making it read it
in again into a different buffer doesn't seem like a nice thing to do,
rather than just letting it reclaim it.
Cheers,
Jeff