Re: Difference in DB size with dump and pg_database_size

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Difference in DB size with dump and pg_database_size
Дата
Msg-id CABUevEzCgEBUUWn8cKj=p1TbZxjAZv-68CVDqGNFAVzU-NESRQ@mail.gmail.com
обсуждение исходный текст
Ответ на Difference in DB size with dump and pg_database_size  (Condor <condor@stz-bg.com>)
Ответы Re: Difference in DB size with dump andpg_database_size  (Condor <condor@stz-bg.com>)
Re: Difference in DB size with dump and pg_database_size  ("Tomáš Vondra" <tv@fuzzy.cz>)
Список pgsql-general
On Tue, Jul 5, 2011 at 10:38, Condor <condor@stz-bg.com> wrote:
> Hello,
> any one can explain me why I have difference between db size when I dump db,
> I see it's 5G and when I run SELECT
> pg_size_pretty(pg_database_size('somedatabase')) As fulldbsize; on my DB
> postgresql return: 10 GB
>
> I run vacuum on db every night. Why is that huge difference in size ?

The dump does not include indexes - for each index it just contains
the CREATE INDEX statement, not the actual data in the index.

And perhaps you've also compressed your dumps? Though in that case,
the difference would probably be bigger...

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

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

Предыдущее
От: Condor
Дата:
Сообщение: Difference in DB size with dump and pg_database_size
Следующее
От: Condor
Дата:
Сообщение: Dump large DB and restore it after all.