Re: Server instrumentation patch - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Server instrumentation patch
Date
Msg-id 20050624161649.GQ89438@decibel.org
Whole thread Raw
In response to Re: Server instrumentation patch  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-hackers
On Fri, Jun 24, 2005 at 05:10:15PM +0100, Dave Page wrote:
> You have pg_database_size(oid) and database_size(name). Afaict, the
> latter is equivalent to:
> 
> SELECT pg_database_size((SELECT oid FROM pg_database WHERE datname =
> 'foo'))
> 
> My main concern is that the names are inconsistent for no obvious
> reason. I also questioned whether or not the bloat of an additional
> function is worthwhile for what is probably a very small number of psql
> users that might use it (probably quite rarely), however if people say
> they would use it and that it's wothwhile, I wouldn't argue with it's
> inclusion.

ISTM it would be better to just add this info into newsysviews. Anyone
who regularly queries against the catalog from psql is going to want to
have them installed anyway. We could either add exact size info to
pg_*_table_storage (http://lnk.nu/cvs.pgfoundry.org/39q.sql) or create a
new view with the file sizes.
-- 
Jim C. Nasby, Database Consultant               decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Server instrumentation patch
Next
From: David Fetter
Date:
Subject: Re: [PATCHES] Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic functions)