Sun Feb 26 19:16:37 PST 2012
- Previous message: [Slony1-hackers] Updating table DDL by removing table/adding from/to replication
- Next message: [Slony1-hackers] Re : Updating table DDL by removing table/adding from/to replication
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 26 Feb 2012, David TECHER wrote: > Hi > > I use Slony 1.2.22 > > Replication: 1 master and 3 slaves. > "Slony command DDL" can not be used because it will take to much time and > we've got a lot of replicated tables. > I am afraid that window of week-end will be not enough. I assume the problem is that you have a lot of tables and that the time slony takes to remove the replication triggers on each table in execute_script is to long. You should plan an upgrade to 2.x since execute script no longer does this. > For the next update, what I would like to suggest to my team ( and we will > have the intention to test if I can convice them) is > > 1) removing all tables - to be altered - from replication using set drop > table(origin=??,id=??) > > 2) apply all DDL queries to the future altered table ( usual way : psql > ....database) > > 3) back all altered tables to replication : > - create set (...) > - set add table(...) to new set > - merge set (new set to the old set associated to the altered > table). > > Can we do that? I don't see any reason why that wouldn't work. You would need to subscribe the subscribers to the new set before you do the merge set. This will cause the tables on the subscriber to be truncated and re-populated. As always, you should make sure you do proper 'wait for events' so the subscribe doesn't happen before all of the subscriber has seen the drop table. Steve > > There is no concurrent activity and we've got the window of the week-end. > > Thanks for your reply. > >
- Previous message: [Slony1-hackers] Updating table DDL by removing table/adding from/to replication
- Next message: [Slony1-hackers] Re : Updating table DDL by removing table/adding from/to replication
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-hackers mailing list