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.