Christopher Browne cbbrowne at ca.afilias.info
Tue Jul 28 12:44:27 PDT 2009
Jaime Casanova <jcasanov at systemguards.com.ec> writes:
> A client has an installation of slony I 1.2.15 with pg 8.3.7 and they
> are having troubles with the size of the database...
> while checking i found that sl_log_2 has more than  102784620 dead
> tuples and the table size grows to 22gb, vac_frecuency is 0 and
> autovacuum is enabled but no vacuum has happened... i will execute a
> manual vacuum later today when the impact is not so big
>
> AFAIUI, slony should switch sl_log_* tables from time to time and then
> truncate the other one but i don't see sl_log_1 being used (never), it
> has 0 live tuples and 0 dead tuples...
>
> ideas?

You may ask explicitly to initiate a switch between the log tables...

 - Via psql, run against the offending node:

      select _my_slony_schema.logswitch_start();

 - Via slonik

      [preamble elided...  assuming the origin is node #1...]

      switch log ( id = 1 );

Either are quite safe; all that the slonik command does is to call the
stored function logswitch_start().

It's conceivable that if slon processes are, for some reason, getting
killed and restarted frequently, that might [mumble, mumble, not
verifying details too much because I'm feeling lazy ;-)] suppress the
switch from ever getting requested.
-- 
output = reverse("ofni.sailifa.ac" "@" "enworbbc")
<http://dba2.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
"Bother,"  said Pooh,  "Eeyore, ready  two photon  torpedoes  and lock
phasers on the Heffalump, Piglet, meet me in transporter room three"


More information about the Slony1-general mailing list