Re: Seq scans status update - Mailing list pgsql-patches

From Gregory Stark
Subject Re: Seq scans status update
Date
Msg-id 878xb8k3xr.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Seq scans status update  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Seq scans status update  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> A point I have not figured out how to deal with is that in the patch as
> given, UnpinBuffer needs to know the strategy; and getting it that info
> would make the changes far more invasive.  But the patch's behavior here
> is pretty risky anyway, since the strategy global at the time of unpin
> might have nothing to do with how it was set when the buffer was
> acquired.  What I'm tempted to do is remove the special case there and
> adjust buffer acquisition instead (maybe make it decrement the
> usage_count when re-using a buffer from the ring).

Is there a reason UnpinBuffer has to be the one to increment the usage count
anyways? Why can't ReadBuffer handle incrementing the count and just trust
that it won't be decremented until the buffer is unpinned anyways?

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Seq scans status update
Next
From: Tom Lane
Date:
Subject: Re: Seq scans status update