Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux