Re: Measuring relation free space

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Measuring relation free space
Date: 2011-12-07 16:22:41
Message-ID: CAJKUy5hdeamcXS44z-MJTbyQkWOw227hmdaQGyt8DMMkgb2zcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 28, 2011 at 5:40 AM, Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
>
>> Unless I am missing something, all indexes are handled via a procedure
>> designed for BTree indices, "GetBTRelationFreeSpace".  I don't know
>> that the ultimate behavior of this is wrong, but it seems unusual.  If
>> I get some more time, I will try to explore what is actually going on
>> when called on other types of indexes.
>
>
> This I think I'll punt back toward Jaime, as well as asking "did you have a
> plan for TOAST here?"
>

for indexes. it seems pageinspect only deals with btree indexes and i
neglected to put a similar limitation on this function... now, because
the free space is calculated using PageGetFreeSpace() for indexes it
should be doing the right thing for all kind of indexes, i only put
the function there because i was trying to avoid to create a new file.
But if the function is right for all kind of indexes that's maybe
enough to create a new file and rename the helper function so is
obvious that it can manage all kind of indexes

for toast tables. a simple test here seems to show that is as easy as
to add toast tables in the supported objects and treat them as normal
pages...

or there is something i'm missing?

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-12-07 16:26:40 Re: documentation issue - extensions
Previous Message Robert Haas 2011-12-07 16:22:30 Re: Inlining comparators as a performance optimisation