Christopher Browne cbbrowne at ca.afilias.info
Tue Jul 28 08:59:54 PDT 2009
Aleksander Kmetec <aleksander.kmetec at intera.si> writes:
> the attached patch fixes 2 bugs I previously reported on slony1-general.
>
> Dataloss bug, described here:
> http://lists.slony.info/pipermail/slony1-general/2009-July/009663.html
>
> Statement blocking bug, described here:
> http://lists.slony.info/pipermail/slony1-general/2009-July/009664.html
>
> The reason for both bugs was the TRUNCATE statement which would wait
> until the concurrent transaction which was writing to sl_log_N would
> commit, at which point it would immediately destroy all the rows
> created by that transaction. While waiting for a longer period of
> time, it would also block other transactions from writing to sl_log_N,
> causing statements to time out.
>
> By trying to get an exclusive lock on sl_log_N (and exiting if that
> fails) it is guaranteed that TRUNCATE will not be executed while
> another transaction is writing to sl_log.
>
> What I don't know is whether this change will have any negative effect
> on log switching and row accumulation in log tables. Hopefully,
> someone will be able to tell if there are unwanted side effects.
>

I like that patch a lot!

Thank you, Aleksander!  Will commit to 2.0+HEAD.
-- 
(reverse (concatenate 'string "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-patches mailing list