Mon Sep 10 06:17:56 PDT 2012
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 8/29/2012 9:27 AM, David TECHER wrote: > Hi, > > I have to do a maintenance on a replicated table. We found that a > foreign key have been added on the replicated table. > > Instead of using DDL execute script, I am used to do > > - removing table from replication > > - doing my altered queries > > - putting back table into replication. > > Since the replicated table has a small size and since my altered query is > > alter table ... add constraint ... foreign key ... references ....(....); > > I asked myself if the 3 steps above are mandatory ( or "DDl execute > script") or if I can execute my altered query directly? It depends on the Slony version you are using. Since version 2.0 DDL "may" be executed safely against any node in the cluster. There is no problem with the system catalog any more, like prior to 2.0. But it should be obvious that certain changes can lead to problems later on. Having extra columns on a master for example would break replication while extra columns on a subscriber are no problem, as long as you never move the set to it. Foreign keys are NOT enforced during replication, so additional FK on a subscriber would eventually lead to trouble when you move set or make that node a stand alone DB. Jan -- Anyone who trades liberty for security deserves neither liberty nor security. -- Benjamin Franklin
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-hackers mailing list