Re: [HACKERS] database size

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] database size
Дата
Msg-id 199801070116.UAA06828@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] database size  (Tony Rios <tonester@ccom.net>)
Список pgsql-hackers
> Just wondering.. did you happen to do an INSERT into the database,
>
> then delete some rows.. say 19megs worth, then re-add...  From what I've
>
> seen msql db's will always be at least the size of the largest you've ever
>
> had the database before.  It will over time, overrite existing deleted
>
> records, but it keeps the data still in there, just sets a delete flag.
>
>
> If you really need to cut the size down, I've had to delete the database
>
> completely, then create another table from scratch.  Not sure if there
>
> is a 'purge' type function available, but you have to be careful that
>
> nobody is accessing the db at that time, since it's very sensitive at
>
> that time.
>

Thanks to Vadim, vacuum shrinks the size to the exact amount needed to
store the data.  Also, the table is locked while vacuuming, so no one
can accidentally access it.

--
Bruce Momjian
maillist@candle.pha.pa.us

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

Предыдущее
От: Shiby Thomas
Дата:
Сообщение: Re: [HACKERS] database size
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] database size