Andrew Sullivan ajs at crankycanuck.ca
Thu Jul 10 14:29:15 PDT 2008
On Thu, Jul 10, 2008 at 09:42:28AM +0800, Ow Mun Heng wrote:
> Then I checked to see if the DDL will run on the slave as is. 

If you check the Slony admin manual, it actually suggests that you do this
on the target machines, wrapped in BEGIN;…;ROLLBACK.  This is because it's
very easy with execute script to run into the problem you just did.  See
section 15.2.

> BTW, at the risk of sounding like a broken record, this _really_ can't
> be executed independent of slony? That would be the best case I would
> say.

Here's why it has to be done with Slony's knowledge: suppose you make a
change to the schema on the data origin at time _t_, and a change to the
schema on a replica at time _t_+2.  Now, suppose you have a transaction that
gets replicated at _t_+1.  The origin has the schema change, and Slony
doesn't know that the schema on the replica isn't ready for the data.  So
it will try to replicate that data, and things will break.

So that's why you need to have it done by Slony.  

A


More information about the Slony1-general mailing list