Bill Moran wmoran at collaborativefusion.com
Mon Dec 17 08:22:08 PST 2007
In response to Vivek Khera <vivek at khera.org>:

> I'm about to split a big table of mine using partitions.  I've done  
> some testing on a test database, and the part of actually moving the  
> data from the current table to each partition will take about 5 days,  
> broken up into small bits of work as transactions.
> 
> Once the data is moved, I am left with a HUGE table which is otherwise  
> empty.  A test run of "vacuum full" on the table takes nearly 2  
> hours.  I can't really afford that on the production system, obviously.
> 
> So my question is, how to use TRUNCATE on that table?  Since it is  
> already empty, does it matter to slony if I just issue TRUNCATE on  
> each of the nodes?  Or do I need to go through the execute script  
> slonik command?  Also, is TRUNCATE in this manner safe at all for slony?

Personally, I would remove the table from replication, truncate it on all
nodes then add it back in to replication.  The initial sync won't take
long since the table is empty.

I doubt that's the only way possible, though.  What you are suggesting
_might_ be OK, but I don't know.

-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran at collaborativefusion.com
Phone: 412-422-3463x4023


More information about the Slony1-general mailing list