Andrew Sullivan <andrew@libertyrms.info> writes:
> If your replication is stopped for a long time, leaving the RI triggers
> on the slave sometimes prevents replication from ever catching up on
> a loaded system. I still haven't figured out why, though.
I suspect the issue has to do with the infamous "triggered data change
violation" code in 7.1. That has O(N^2) behavior if a single
transaction makes a lot of repeated updates to the same rows. Which
I think is exactly the scenario for Andrew's system when the replicator
gets behind and is trying to propagate a lot of history in one batch.
The error check and the O(N^2) behavior are both gone in 7.2.
regards, tom lane