Re: For review: dbsize patch

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: For review: dbsize patch
Дата
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E490E77B@ratbert.vale-housing.co.uk
обсуждение исходный текст
Ответ на For review: dbsize patch  ("Dave Page" <dpage@vale-housing.co.uk>)
Ответы Re: For review: dbsize patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> Sent: 28 June 2005 00:58
> To: Dave Page
> Cc: PostgreSQL-development
> Subject: Re: [HACKERS] For review: dbsize patch
>
> Dave Page wrote:
> > The attached patch is an update of the dbsize integration patch
> > discussed last week. This version includes the following functions:
> >
> > pg_relation_size(text)   - Get relation size by name/schema.name
> > pg_relation_size(oid)    - Get relation size by OID
> > pg_tablespace_size(name) - Get tablespace size by name
> > pg_tablespace_size(oid)  - Get tablespace size by OID
> > pg_database_size(name)   - Get database size by name
> > pg_database_size(oid)    - Get database size by OID
> > pg_size_pretty(int8)     - Pretty print (and round) the byte size
> > specified (eg, 123456 = 121KB)
> >
> > 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/dbsiz
> e/dbsize.s
> > ql.in) and has therefore never been in a release version.
>
> Uh, do any of these include the index size?  TOAST size?

No, only total_relation_size() does that.

> > 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?
>
> I would follow whatever we do in pg_proc now.

There are a couple of SQL functions in there, but they are nowhere near
as long as this one. I'll look at implementing it in C.

Regards, Dave.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: text search ysing ltree
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: #ifdef NOT_USED