Re: For review: dbsize patch - Mailing list pgsql-hackers

From Michael Paesold
Subject Re: For review: dbsize patch
Date
Msg-id 024201c57b30$1aec2f20$0f01a8c0@zaphod
Whole thread Raw
In response to For review: dbsize patch  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-hackers
Dave Page wrote:

> The only remaining function that last week's brief discussion indicated
> was required is a replacement for total_relation_size() (or
> pg_table_size() as it might now be called). I didn't realise until a
> few minutes ago that this function (which is actually broken because it
> doesn't handle schemas) was only committed a couple of months ago
> (v1.5,
> http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dbsize/dbsize.sql.in) > 
> and has therefore never been in a release version.
>
> So should we include this new feature, and if so, how is it best added > - 
> rewrite in C, or one long line in pg_proc?

IIRC the initially submitted patch for this contained a function written in 
C. It was only afterwards converted to SQL because of a comment by someone 
else. I will have a look in the archives.

What I would like to have is a function that returns the table size (+ 
toast) + indexes. If it would be called pg_table_size(), that would be ok. 
We should have one with oid and another with text.

Best Regards,
Michael Paesold 



pgsql-hackers by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: tsearch2 vs core?
Next
From: Tom Lane
Date:
Subject: Re: Fixing r-tree semantics