From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Jaime Casanova <jaime(at)2ndquadrant(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, Greg Smith <greg(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Measuring relation free space |
Date: | 2012-01-24 00:18:59 |
Message-ID: | 20120124001859.GA31986@tornado.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 23, 2012 at 04:56:24PM -0300, Alvaro Herrera wrote:
> Excerpts from Noah Misch's message of vie ene 20 22:33:30 -0300 2012:
> > pgstattuple() figures the free_percent by adding up all space available to
> > hold tuples and dividing that by the simple size of the relation. Non-leaf
> > pages and the meta page get identical treatment: both never hold tuples, so
> > they do not contribute to the free space.
>
> Hm. Leaf pages hold as much tuples as non-leaf pages, no? I mean
> for each page element there's a value and a CTID. In non-leaf those
> CTIDs point to other index pages, one level down the tree; in leaf pages
> they point to the heap.
That distinction seemed important when I sent my last message, but now I agree
that it's largely irrelevant for free space purposes. If someone feels like
doing it, +1 for making pgstattuple() count non-leaf free space.
Thanks,
nm
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-01-24 00:52:51 | Re: basic pgbench runs with various performance-related patches |
Previous Message | Merlin Moncure | 2012-01-23 22:49:42 | Re: GUC_REPORT for protocol tunables was: Re: Optimize binary serialization format of arrays with fixed size elements |