Re: Disk usage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Disk usage
Дата
Msg-id 20311.1052404788@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Disk usage  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Ответы Re: Disk usage  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-general
"Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> On 8 May 2003 at 12:41, Daniel Lublin wrote:
>> I am wondering if there is some utility for postgresql, which can
>> display the amount of disk space that a database (and possibly even
>> more finer grained; a table) occupies?

> du in $PGDATA coupled with oid2name to figure out what is the object you are
> lookng at.

Or do

    vacuum;
    select relname, relpages * 8 from pg_class;

to get table sizes in kilobytes.  relpages is not updated on-the-fly,
only by vacuum, so you need to have done vacuum recently to get
trustworthy numbers.

            regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug or limitation?
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: record new is unassigned yet