Brad Nicholson bnichols
Wed Dec 13 06:10:32 PST 2006
On Wed, 2006-12-13 at 01:31 +0100, Andreas Kostyrka wrote:
> * Brad Nicholson <bnichols at ca.afilias.info> [061212 20:42]:
> > On Tue, 2006-12-12 at 20:22 +0100, Andreas Kostyrka wrote:
> > > * Andrew Sullivan <ajs at crankycanuck.ca> [061212 19:27]:
> > > > On Tue, Dec 12, 2006 at 06:48:16PM +0100, hubert depesz lubaczewski wrote:
> > > > > question is - what is the worst case scenario? what should happen for me to
> > > > > get punished for this?
> > > > 
> > > > - Inserts to the master break
> > > > - Replication attempts break (on a set containing the data that's
> > > > causing the problem) -- which blocks all subsequent replication too,
> > > > note.
> > > > 
> > > > > as for now - even with bad (kvvvv instead of kvvvvv) triggers i still get
> > > > > good results (kudos to dev team).
> > > > 
> > > > No, you're _not_ getting good results.  You're getting lucky.  The
> > > > problem crops up in a way that makes it hard to predict when it will
> > > > happen (it's not indeterminate, it's just got a lot of variables).
> > > > 
> > > > > is it safe but not sugested, or there is some scenario which could lead to
> > > > > something bad? if yes, then what scenario and what bad?
> > > >
> > > > No, it is not safe.  This is the basis of the discussion recently. 
> > > > See the recap above.
> > > 
> > > Ok, so how does the 
> > > psql -c 'alter table x add column y text;' -h slave
> > > psql -c 'alter table x add column y text;' -h master
> > > 
> > > break? I need to ask as I've been using it for over 6 months without
> > > troubles.
> > 
> > As mentioned, the slony triggers are aware of the columns on the tables.
> > When you add a column manually, it is not aware of that column.
> Interestingly it seems to replicate the column anyway? At least nobody
> ever complained about columns not getting replicated to me in the last
> 9 months, and this is quite unprobable, as most readonly queries are
> done against slaves herearound nowadays => if something wouldn't get
> replicated I'm almost certain somebody would have came to me to hunt
> for my scalp already.

Well, all I can say to you is that I speak from experience.  When I
first started using Slony, I was working with the same false assumption
you have about DDL.  Things worked fine out fine for several months as
well, over several changes.  Then one afternoon while applying some
routine changes directly, things didn't go so well.  Several hours were
spent doing major surgery to slony (fixing broken triggers, identifying
broken events and fixing them by hand) to bring it back to life. 

All that aside, if DDL on the fly is critical to you, then Slony is not
the right tool for you.
-- 
Brad Nicholson  416-673-4106
Database Administrator, Afilias Canada Corp.




More information about the Slony1-general mailing list