Lists: | pgsql-hackers |
---|
From: | Bernd Helmle <mailings(at)oopsware(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | psql \dt and table size |
Date: | 2011-03-21 17:44:51 |
Message-ID: | 11AFCA7F6987BE68E91C000D@[172.26.14.62] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
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).
Attached minor patch extends \dt to use pg_table_size() starting with
PostgreSQL 9.0, not sure if we backport such changes though. It would be
interesting for 9.1, however.
--
Thanks
Bernd
Attachment | Content-Type | Size |
---|---|---|
psql_tablesize.patch | application/octet-stream | 1.5 KB |
From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Bernd Helmle <mailings(at)oopsware(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: psql \dt and table size |
Date: | 2011-03-21 23:32:09 |
Message-ID: | 20110321233209.GC27692@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
+1 for fixing this behavior in 9.1. -1 for changing in 9.0, as the
change in behavior mid-release will cause more confusion than the
incomplete accounting does.
Cheers,
David.
On Mon, Mar 21, 2011 at 06:44:51PM +0100, Bernd Helmle 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).
>
> Attached minor patch extends \dt to use pg_table_size() starting
> with PostgreSQL 9.0, not sure if we backport such changes though. It
> would be interesting for 9.1, however.
>
> --
> Thanks
>
> Bernd
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From: | Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Bernd Helmle <mailings(at)oopsware(dot)de>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: psql \dt and table size |
Date: | 2011-03-22 16:47:39 |
Message-ID: | AANLkTikEv7HKaQSWzrXF7dWBqS5zD3=TJQPONMONuPv=@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2011/3/22 David Fetter <david(at)fetter(dot)org>:
> +1 for fixing this behavior in 9.1. -1 for changing in 9.0, as the
> change in behavior mid-release will cause more confusion than the
> incomplete accounting does.
Idem.
>
> Cheers,
> David.
> On Mon, Mar 21, 2011 at 06:44:51PM +0100, Bernd Helmle 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).
>>
>> Attached minor patch extends \dt to use pg_table_size() starting
>> with PostgreSQL 9.0, not sure if we backport such changes though. It
>> would be interesting for 9.1, however.
>>
>> --
>> Thanks
>>
>> Bernd
>
>
>>
>> --
>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-hackers
>
>
> --
> David Fetter <david(at)fetter(dot)org> http://fetter.org/
> Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
> Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
> iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
--
Cédric Villemain 2ndQuadrant
http://2ndQuadrant.fr/ PostgreSQL : Expertise, Formation et Support
From: | Susanne Ebrecht <susanne(at)2ndQuadrant(dot)com> |
---|---|
To: | Bernd Helmle <mailings(at)oopsware(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: psql \dt and table size |
Date: | 2011-03-23 19:22:20 |
Message-ID: | 4D8A486C.3020303@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello Bernd,
On 21.03.2011 18:44, Bernd Helmle wrote:
>
> Attached minor patch extends \dt to use pg_table_size() starting with
> PostgreSQL 9.0, not sure if we backport such changes though. It would
> be interesting for 9.1, however.
As I already told you:
I tested and it worked.
The code looks correct to me.
You just should send the code to a beauty farm - the wrinkles (braces)
could get placed better also it could be more. :)
Susanne
--
Susanne Ebrecht - 2ndQuadrant
PostgreSQL Development, 24x7 Support, Training and Services
www.2ndQuadrant.com