Re: Dbsize backend integration

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Dbsize backend integration
Date: 2005-06-30 08:48:11
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E490E836@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> Sent: 29 June 2005 12:46
> To: Dave Page
> Cc: PostgreSQL-patches; PostgreSQL-development
> Subject: Re: [PATCHES] Dbsize backend integration
>
> I have a new idea --- pg_storage_size().

I'm not against that one, but I think Tom's point is vaild. I cannot
think of anything better at the moment though (maybe pg_component_size,
but that's equally random) :-(

Anyone else? Please? Someone? Anyone? :-)

> That would do just the
> toast/index/heap, and pg_relation_size() gets a total of them all, and
> only works on heap, no index or toast.

The totalling version (whatever it ends up being called) should
definitely work on toast tables, as it is a legitimate use case to want
to see the size of such a table and it's indexes, independent of the
owner table. There is no need for it to work on an index though,
however, it will return the right answer if it is used that way, so I
think that trying to prevent it will be unecessary code that simply
slows down the majority of invocations of the function for no benefit.

Regards, Dave.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Glaesemann 2005-06-30 09:00:42 Re: Dbsize backend integration
Previous Message falcon 2005-06-30 08:31:19 Re: contrib/rtree_gist into core system?

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Glaesemann 2005-06-30 09:00:42 Re: Dbsize backend integration
Previous Message Peter Eisentraut 2005-06-30 08:41:36 Re: psql patch for displaying the username when asking password