Christopher Browne cbbrowne
Tue Nov 30 18:59:15 PST 2004
Rod Taylor wrote:

>On Tue, 2004-11-30 at 12:23 -0500, Jan Wieck wrote:
>  
>
>>On 11/30/2004 11:29 AM, Rod Taylor wrote:
>>
>>    
>>
>>>I've been trying various methods of making Slony fail, and have noticed
>>>that after numerous attempts that the database is growing quickly in
>>>size without any data.
>>>
>>>The reason of course is the initial COPY, when rolled back, leaves a ton
>>>of dead tuples in the structures an indexes.
>>>
>>>Please consider adding a VACUUM of the subscriber in between retries.
>>>      
>>>
>>Unfortunately it is impossible to add a vacuum to slon right in between 
>>the delete and the copy, since everything is done in one transaction 
>>(and has to). So this can only be an administrative suggestion.
>>    
>>
>
>I mean between the 2 attempts of slony to go through the initial copy --
>so after slony issues a rollback() on the subscriber.
>  
>
Actually, the even better answer involves submitting a TRUNCATE request 
on the table; that clears everything out posthaste.  That was briefly in 
pre-1.0.3.

Unfortunately, that falls prey to two issues:
 1.  It doesn't work out so well on 7.3, where TRUNCATE must run 
_outside_ a transaction

 2.  Foreign key constraints bite the truncate if they exist.

Those factors mean that it's troublesome to use TRUNCATE, which would be 
the "better" answer...


More information about the Slony1-general mailing list