On Fri, Nov 4, 2011 at 10:46 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> Seems a little hackish, though: we'd be reporting an amount of
>> freespace that we've deliberately set to an incorrect value. I'm
>> almost thinking we should report the freespace that's actually
>> available, on the theory that Bload Is Bad (TM).
>
> IIRC, this code is following the very longstanding precedent of
> RelationGetBufferForTuple.
I don't understand the analogy - that function isn't freeing any
space, just searching for a block that already has some. And it does
update the free space map if the free space map is found to be out of
date, whereas this function does not.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company