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

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?
Дата
Msg-id 6602E48C-D15F-446E-ABEB-A0B5BD2C4AEA@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 16 Mar 2012, at 20:20, Aleksey Tsalolikhin wrote:

> CLUSTER requires free space at least equal to the sum of the table
> size and the index sizes.
>
> pg_reorg rquires amount of space twice larger than target table and indexes.
>
> Too bad I can't say "CLUSTER TABLE tablename USING_ARRAY
> /dev/temp/array" or something
> like that, using an external array for temporary storage just for the
> cluster.  I do have an external
> USB drive with more than enough free space on it.


You could move the table to a different TABLESPACE, namely one on that USB disk. I'm not particular to the intrinsics
oftablespaces, but it's possible that moving it would trigger a rewrite of the contents such that the effect would be
similarto what CLUSTER would do for you - it probably just moves the files though, in which case you'd perform the
CLUSTERon the new TABLESPACE and then move it back. 

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Temporal foreign keys
Следующее
От: prem tolani
Дата:
Сообщение: Query