Christopher Browne cbbrowne at ca.afilias.info
Thu Feb 28 13:01:51 PST 2008
Ow Mun Heng <Ow.Mun.Heng at wdc.com> writes:
> I've done the forced log_switching and I've waited >12 hours and still
> the cleanup on the logs has still not occurred.
>
> How can I force the cleanup to happen?
>
> I'm already doing -c2 and now trying -c1 options

Several things can prevent the log switch from completing, and running
TRUNCATE against sl_log_1.  (I assume, here, the switch from sl_log_1
to sl_log_2; the same applies, without loss of generality, to the
opposite direction...)

Basically, if there are any tuples left in sl_log_1, it won't TRUNCATE
sl_log_1, and complete the switch.

That could happen due to several different apparent causes that can
manifest, but at base, it goes back to the issue of whether:

- Replication is keeping up to date, that is, the data in sl_log_1 has
  all been replicated to all the subscribes, and hence isn't needed
  anymore;

- Confirmations are getting communicated back and forth successfully;

- OLD confirmations are therefore able to be purged.

The script "test_slony_state.pl" (or DBI-based brother,
test_slony_state-dbi.pl) monitors this sort of information, and
generates warnings when it sees some known-problematic states.  

Have you been running that script?

If you are seeing any sort of "mysterious" behaviour, the FIRST thing
to do is to run that script, and see if it has any guidance for you.

Indeed, when I was in operations, I would set the policy of running
test_slony_state.pl against *EVERY* cluster, once an hour, as a
standard health check.  It notices quite a number of conditions that
will eventually adversely affect a cluster.  

I am certain that the output from it would be useful in diagnosing why
you are seeing bloating of some of the Slony-I tables.
-- 
(reverse (concatenate 'string "gro.mca" "@" "enworbbc"))
http://www3.sympatico.ca/cbbrowne/spiritual.html
Is A.I. Possible?
Some ask "Can humans create intelligent machines?" In fact, humans do
it all the time. The question needs to be "Since it's possible in the
bedroom, why shouldn't it be possible in the laboratory?"
-- Mark Miller


More information about the Slony1-general mailing list