storage calculations

Поиск
Список
Период
Сортировка
От pgboy@guthrie.charm.net
Тема storage calculations
Дата
Msg-id 20030729180926.EFE0913EA6@guthrie.charm.net
обсуждение исходный текст
Список pgsql-admin
i've been browsing the documentation online, and i can't
find where the storage layouts for tables and indexes are
explained.

i'd like to be able to figure out, given a table or two
with a simple schema (no ineritance) and some indexes, and
a number of rows currently in these tables, how much disk
space is being used.

the underlying problem being worked here, by the way, is
to come up with a task that monitors space used by the database
so as to issue a warning of some sort when the partition
upon which the database resides is getting full. i had originally
used the statfs output from the (unix) os, but for this to accurately
reflect the "used" space, i found i had to do a "vacuum full" and
compress the database. i'd rather come up with a heuristic where
i can take a number of rows (which i get from the reltuples column
in pg_class, which seems to be accurate after running 'analyze')
and multiply by some number i have calculated based on the table
schema to get a fairly accurate guess at the real space used.

any and all advice welcome, and thanks.

pg

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

Предыдущее
От: Renney Thomas
Дата:
Сообщение: 7.3.4 and OpenSSl
Следующее
От: Robert Treat
Дата:
Сообщение: Re: translate referential integrity violation