From: | Alban Hertroys <haramrae(at)gmail(dot)com> |
---|---|
To: | Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com> |
Cc: | Greg Williamson <gwilliamson39(at)yahoo(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it? |
Date: | 2012-03-16 23:14:10 |
Message-ID: | 6602E48C-D15F-446E-ABEB-A0B5BD2C4AEA@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 of tablespaces, but it's possible that moving it would trigger a rewrite of the contents such that the effect would be similar to what CLUSTER would do for you - it probably just moves the files though, in which case you'd perform the CLUSTER on the new TABLESPACE and then move it back.
Alban Hertroys
--
Screwing up is an excellent way to attach something to the ceiling.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2012-03-17 00:23:28 | Re: Query |
Previous Message | prem tolani | 2012-03-16 21:38:06 | Query |