Re: WIP: 2nd-generation buffer ring patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: WIP: 2nd-generation buffer ring patch
Date
Msg-id 26720.1180497731@sss.pgh.pa.us
Whole thread Raw
In response to Re: WIP: 2nd-generation buffer ring patch  (Greg Smith <gsmith@gregsmith.com>)
List pgsql-patches
Greg Smith <gsmith@gregsmith.com> writes:
> Based on my observations of buffer cache statistics, the number of pinned
> buffers at any time is small enough that in a reasonably sized buffer
> cache, I wouldn't expect a change in the pinned usage_count behavior to
> have any serious impact.

Fair enough.  The patch I put up earlier tonight bumps usage_count at
PinBuffer instead of UnpinBuffer time, and leaves the clock sweep
behavior unchanged, which means that a buffer that had stayed pinned for
more than a clock-sweep cycle time could get recycled almost instantly
after being unpinned.  That seems intuitively bad.  If we make the clock
sweep code not decrement usage_count of a pinned buffer then the problem
goes away.  I had expressed some discomfort with that idea, but I've got
to admit that it's only a vague worry not anything concrete.  Barring
objections I'll adjust the patch to include the clock-sweep change.

            regards, tom lane

pgsql-patches by date:

Previous
From: Greg Smith
Date:
Subject: Re: WIP: 2nd-generation buffer ring patch
Next
From: Greg Smith
Date:
Subject: Re: Logging checkpoints and other slowdown causes