Thu Sep 28 07:38:42 PDT 2006
- Previous message: [Slony1-general] where does primary key info get stored?
- Next message: [Slony1-general] where does primary key info get stored?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Sep 28, 2006 at 10:33:10AM -0400, Christopher Browne wrote: > You can modify the primary key as part of EXECUTE SCRIPT; at the end > of EXECUTE SCRIPT, the logtrigger trigger gets regenerated, so that if > the primary key changes, that will be reflected properly. But not if > you do the alterations outside a script run via EXECUTE SCRIPT... The key point I was trying to make, though, is that the change isn't merely a matter of the primary key changing. For instance, if you add a field or rename one, the trigger has the wrong idea about what's in the table. In earlier versions of the trigger, we actually didn't check this on the way by in the trigger (for speed), so you could get the wrong data attempting to be inserted on the target. I _think_ Jan fixed that by checking at trigger firing time that your table matches what the trigger thinks it should have, so that now transactions start failing on the origin under some circumstances. (Am I right about that, or are we still subject to the no-checking form of the trigger?) In any case, never make DDL changes without putting them through EXECUTE SCRIPT. This is an absolute requirement of Slony, and if you don't follow it, you can expect it to break. A -- Andrew Sullivan | ajs at crankycanuck.ca Everything that happens in the world happens at some place. --Jane Jacobs
- Previous message: [Slony1-general] where does primary key info get stored?
- Next message: [Slony1-general] where does primary key info get stored?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list