Wed Jul 27 11:09:40 PDT 2005
- Previous message: [Slony1-general] RE: PATCH: refactoring slon a tiny bit
- Next message: [Slony1-general] Use of WAIT FOR EVENT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello. I'm trying to improve the time it takes to add a new table to an existing set. With 3 replicas, all in the same host, it is taking close to 10 seconds to add a new table. I suspect the problem is with all the WAIT FOR EVENT commands I'm issuing during the creation script. The documentation is not totally clear about when it is necessary to wait for the previous event to be processed, so I don't know if I can remove some waits. Could anyone give me some hints about which are really necessary? For instance, is it necessary to wait between the subscribe set commands? My script is the following: cluster name = cluster; node 1 admin conninfo = 'host=localhost dbname=db1 user=postgres; node 2 admin conninfo = 'host=localhost dbname=db2 user=postgres; node 3 admin conninfo = 'host=localhost dbname=db3 user=postgres; create set (id=4, origin=1, comment='Temp set'); WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = ALL, WAIT ON = 1); set add table (set id=4, origin=1, id=6, fully qualified name = 'public.dir17', comment='dir17'); WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = ALL, WAIT ON = 1); subscribe set ( id = 4, provider = 1, receiver = 2, forward = yes); WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = ALL, WAIT ON = 1); subscribe set ( id = 4, provider = 1, receiver = 3, forward = yes); WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = ALL, WAIT ON = 1); merge set ( ID = 1, ADD ID = 4, ORIGIN = 1 ); I have another related question. If I send two commands before waiting for an event, is the wait guaranteed to return only when both events were processed? For instance: subscribe set ( id = 4, provider = 1, receiver = 2, forward = yes); subscribe set ( id = 4, provider = 1, receiver = 3, forward = yes); WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = ALL, WAIT ON = 1); merge set ( ID = 1, ADD ID = 4, ORIGIN = 1 ); I know that Slonik only waits for the previous event, but since the subscribe events are issued on the same node, aren't they ordered, so that it is enough to wait for the last one? Thank you in advance, Nuno
- Previous message: [Slony1-general] RE: PATCH: refactoring slon a tiny bit
- Next message: [Slony1-general] Use of WAIT FOR EVENT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list