Re: psql \dt and table size

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql \dt and table size
Date: 2011-03-25 05:48:49
Message-ID: AANLkTiniZmZ5pHVckjWvnYE3ToXya=a+7iAHvaAqDYem@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/3/24 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Wed, Mar 23, 2011 at 4:50 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> 2011/3/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
>>> Excerpts from Robert Haas's message of mié mar 23 17:24:59 -0300 2011:
>>>> On Mon, Mar 21, 2011 at 1:44 PM, Bernd Helmle <mailings(at)oopsware(dot)de> wrote:
>>>> > It stroke me today again, that \dt+ isn't displaying the acurate table size
>>>> > for tables, since it uses pg_relation_size() till now. With having
>>>> > pg_table_size() since PostgreSQL 9.0 available, i believe it would be more
>>>> > useful to have the total acquired storage displayed, including implicit
>>>> > objects (the mentioned case where it was not very useful atm was a table
>>>> > with a big TOAST table).
>>>>
>>>> I guess the threshold question for this patch is whether
>>>> pg_table_size() is a "more accurate" table size or just a different
>>>> one.
>>>
>>> Not including the toast table and index in the size is just plain wrong.
>>> Reporting the size without the toast objects is an implementation
>>> artifact that should not be done unless explicitely requested.
>>
>> +1
>>
>> can we enhance a detail for table and show more accurate numbers?
>>
>> table size: xxx
>> toast size: xxx
>> indexes size: xxx
>
> Only if we don't mind going beyond 80 columns.
>

sure, it is on new lines

Pavel

> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-03-25 07:38:42 Re: Avoiding timeline generation
Previous Message Piyush Newe 2011-03-25 04:25:51 Re: Rectifying wrong Date outputs