Re: Determining size of a database before dumping

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Determining size of a database before dumping
Дата
Msg-id 15151.1159823986@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Determining size of a database before dumping  (Alexander Staubo <alex@purefiction.net>)
Ответы Re: Determining size of a database before dumping  (Alexander Staubo <alex@purefiction.net>)
Re: Determining size of a database before dumping  (Ron Johnson <ron.l.johnson@cox.net>)
Список pgsql-general
Alexander Staubo <alex@purefiction.net> writes:
> You could count the disk space usage of the actual stored tuples,
> though this will necessarily be inexact:
>    http://www.postgresql.org/docs/8.1/static/diskusage.html
> Or you could count the size of the physical database files (/var/lib/
> postgresql or wherever). While these would be estimates, you could at
> least guarantee that the dump would not *exceed* the esimtate.

You could guarantee no such thing; consider compression of TOAST values.
Even for uncompressed data, datatypes such as int and float can easily
print as more bytes than they occupy on-disk.

Given all the non-data overhead involved (eg for indexes), it's probably
unlikely that a text dump would exceed the "du" size of the database,
but it's far from "guaranteed".

            regards, tom lane

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

Предыдущее
От: Madison Kelly
Дата:
Сообщение: Re: Determining size of a database before dumping
Следующее
От: "Aaron Glenn"
Дата:
Сообщение: Experiences with 3PAR