Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?
Дата
Msg-id CALd+dcdFgBv9W5WiLsuF_6qZ6rmzKoj31YLV2NzAajFvfcmB-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?  (Nur Hidayat <hidayat365@gmail.com>)
Ответы Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?  (Aleksey Tsalolikhin <atsaloli.tech@gmail.com>)
Список pgsql-general
On Mon, Mar 12, 2012 at 3:06 AM, Nur Hidayat <hidayat365@gmail.com> wrote:
> I once have the same problem. In my case it's because most of my table using
> text datatype.
> When I change the field type to character varying (1000) database size
> reduced significantly

I'll bet what happened was postgres re-wrote your table for you,
effectively doing a compaction.  You can get similar effect by doing
an alter table and "changing" an INTEGER field to be INTEGER.
Postgres does not optimize that do a no-op, so you get the re-writing
effect.

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

Предыдущее
От: Martin Gregorie
Дата:
Сообщение: Re: How to find compiled-in default port number?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: How to find compiled-in default port number?