Thu Jul 5 11:19:06 PDT 2007
- Previous message: [Slony1-commit] slony1-engine/src/slon cleanup_thread.c remote_worker.c
- Next message: [Slony1-commit] slony1-engine/src/slonik parser.y scan.l slonik.c slonik.h
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/backend In directory main.slony.info:/tmp/cvs-serv2930/src/backend Modified Files: slony1_base.sql slony1_funcs.sql test_listen_path_gen.sql Log Message: Removed all support for STORE/DROP TRIGGER commands. Users are supposed to use the ALTER TABLE [ENABLE|DISABLE] TRIGGER functionality in Postgres from now on. Jan Index: test_listen_path_gen.sql =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/backend/test_listen_path_gen.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_listen_path_gen.sql 20 Mar 2006 22:20:48 -0000 1.1 --- test_listen_path_gen.sql 5 Jul 2007 18:19:04 -0000 1.2 *************** *** 103,107 **** -- 21 <-> 20 <-> 1 <-> 10 <-> 11 ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_trigger, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node(no_id) values (1); --- 103,107 ---- -- 21 <-> 20 <-> 1 <-> 10 <-> 11 ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node(no_id) values (1); *************** *** 146,150 **** -- v / \ v -- 3 5 ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_trigger, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node(no_id) values (1); --- 146,150 ---- -- v / \ v -- 3 5 ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node(no_id) values (1); *************** *** 169,173 **** --Test3 --Fully meshed setup with 10 nodes ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_trigger, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node (no_id) select * from nodes; --- 169,173 ---- --Test3 --Fully meshed setup with 10 nodes ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node (no_id) select * from nodes; *************** *** 187,191 **** --A transitiv graph with 10 nodes --This should warn about unreachable nodes ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_trigger, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node (no_id) select * from nodes; --- 187,191 ---- --A transitiv graph with 10 nodes --This should warn about unreachable nodes ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node (no_id) select * from nodes; *************** *** 204,208 **** --A (nearly) transitiv graph with 10 nodes, but with the missing --connection (1 -> 10) added. ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_trigger, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node (no_id) select * from nodes; --- 204,208 ---- --A (nearly) transitiv graph with 10 nodes, but with the missing --connection (1 -> 10) added. ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node (no_id) select * from nodes; *************** *** 225,229 **** -- 21 <-> 20 <-> 1 <-> 10 <-> 11 ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_trigger, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node(no_id) values (1); --- 225,229 ---- -- 21 <-> 20 <-> 1 <-> 10 <-> 11 ! truncate _slony_regress1.sl_set, _slony_regress1.sl_setsync, _slony_regress1.sl_table, _slony_regress1.sl_sequence, _slony_regress1.sl_subscribe, _slony_regress1.sl_listen, _slony_regress1.sl_path, _slony_regress1.sl_node; insert into _slony_regress1.sl_node(no_id) values (1); Index: slony1_base.sql =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_base.sql,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** slony1_base.sql 27 Jun 2007 15:51:35 -0000 1.34 --- slony1_base.sql 5 Jul 2007 18:19:04 -0000 1.35 *************** *** 137,159 **** -- ---------------------------------------------------------------------- - -- TABLE sl_trigger - -- ---------------------------------------------------------------------- - create table @NAMESPACE at .sl_trigger ( - trig_tabid int4, - trig_tgname name, - - CONSTRAINT "sl_trigger-pkey" - PRIMARY KEY (trig_tabid, trig_tgname), - CONSTRAINT "trig_tabid-tab_id-ref" - FOREIGN KEY (trig_tabid) - REFERENCES @NAMESPACE at .sl_table (tab_id) - ON DELETE CASCADE - ) WITHOUT OIDS; - comment on table @NAMESPACE at .sl_trigger is 'Holds information about triggers on tables managed using Slony-I'; - comment on column @NAMESPACE at .sl_trigger.trig_tabid is 'Slony-I ID number of table the trigger is on'; - comment on column @NAMESPACE at .sl_trigger.trig_tgname is 'Indicates the name of a trigger'; - - - -- ---------------------------------------------------------------------- -- TABLE sl_sequence -- ---------------------------------------------------------------------- --- 137,140 ---- Index: slony1_funcs.sql =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** slony1_funcs.sql 27 Jun 2007 15:51:35 -0000 1.113 --- slony1_funcs.sql 5 Jul 2007 18:19:04 -0000 1.114 *************** *** 3443,3584 **** -- ---------------------------------------------------------------------- - -- FUNCTION storeTrigger (trig_tabid, trig_tgname) - -- ---------------------------------------------------------------------- - create or replace function @NAMESPACE at .storeTrigger (int4, name) - returns bigint - as ' - declare - p_trig_tabid alias for $1; - p_trig_tgname alias for $2; - begin - perform @NAMESPACE at .storeTrigger_int(p_trig_tabid, p_trig_tgname); - return @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''STORE_TRIGGER'', - p_trig_tabid::text, p_trig_tgname::text); - end; - ' language plpgsql; - comment on function @NAMESPACE at .storeTrigger (int4, name) is - 'storeTrigger (trig_tabid, trig_tgname) - - Submits STORE_TRIGGER event to indicate that trigger trig_tgname on - replicated table trig_tabid will NOT be disabled.'; - - -- ---------------------------------------------------------------------- - -- FUNCTION storeTrigger_int (trig_tabid, trig_tgname) - -- ---------------------------------------------------------------------- - create or replace function @NAMESPACE at .storeTrigger_int (int4, name) - returns int4 - as ' - declare - p_trig_tabid alias for $1; - p_trig_tgname alias for $2; - v_tab_altered boolean; - begin - -- ---- - -- Grab the central configuration lock - -- ---- - lock table @NAMESPACE at .sl_config_lock; - - -- ---- - -- Get the current table status (altered or not) - -- ---- - select tab_altered into v_tab_altered - from @NAMESPACE at .sl_table where tab_id = p_trig_tabid; - if not found then - -- ---- - -- Not found is no hard error here, because that might - -- mean that we are not subscribed to that set - -- ---- - return 0; - end if; - - -- ---- - -- Make sure that an entry for this trigger exists - -- ---- - delete from @NAMESPACE at .sl_trigger - where trig_tabid = p_trig_tabid - and trig_tgname = p_trig_tgname; - insert into @NAMESPACE at .sl_trigger ( - trig_tabid, trig_tgname - ) values ( - p_trig_tabid, p_trig_tgname - ); - - return p_trig_tabid; - end; - ' language plpgsql; - comment on function @NAMESPACE at .storeTrigger_int (int4, name) is - 'storeTrigger_int (trig_tabid, trig_tgname) - - Processes STORE_TRIGGER event to make sure that trigger trig_tgname on - replicated table trig_tabid is NOT disabled.'; - - -- ---------------------------------------------------------------------- - -- FUNCTION dropTrigger (trig_tabid, trig_tgname) - -- ---------------------------------------------------------------------- - create or replace function @NAMESPACE at .dropTrigger (int4, name) - returns bigint - as ' - declare - p_trig_tabid alias for $1; - p_trig_tgname alias for $2; - begin - perform @NAMESPACE at .dropTrigger_int(p_trig_tabid, p_trig_tgname); - return @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''DROP_TRIGGER'', - p_trig_tabid::text, p_trig_tgname::text); - end; - ' language plpgsql; - comment on function @NAMESPACE at .dropTrigger (int4, name) is - 'dropTrigger (trig_tabid, trig_tgname) - - Submits DROP_TRIGGER event to indicate that trigger trig_tgname on - replicated table trig_tabid WILL be disabled.'; - - - -- ---------------------------------------------------------------------- - -- FUNCTION dropTrigger_int (trig_tabid, trig_tgname) - -- ---------------------------------------------------------------------- - create or replace function @NAMESPACE at .dropTrigger_int (int4, name) - returns int4 - as ' - declare - p_trig_tabid alias for $1; - p_trig_tgname alias for $2; - v_tab_altered boolean; - begin - -- ---- - -- Grab the central configuration lock - -- ---- - lock table @NAMESPACE at .sl_config_lock; - - -- ---- - -- Get the current table status (altered or not) - -- ---- - select tab_altered into v_tab_altered - from @NAMESPACE at .sl_table where tab_id = p_trig_tabid; - if not found then - -- ---- - -- Not found is no hard error here, because that might - -- mean that we are not subscribed to that set - -- ---- - return 0; - end if; - - -- ---- - -- Remove the entry from sl_trigger - -- ---- - delete from @NAMESPACE at .sl_trigger - where trig_tabid = p_trig_tabid - and trig_tgname = p_trig_tgname; - - return p_trig_tabid; - end; - ' language plpgsql; - comment on function @NAMESPACE at .dropTrigger_int (int4, name) is - 'dropTrigger_int (trig_tabid, trig_tgname) - - Processes DROP_TRIGGER event to make sure that trigger trig_tgname on - replicated table trig_tabid IS disabled.'; - - -- ---------------------------------------------------------------------- -- FUNCTION ddlScript_prepare (set_id, only_on_node) -- --- 3443,3446 ----
- Previous message: [Slony1-commit] slony1-engine/src/slon cleanup_thread.c remote_worker.c
- Next message: [Slony1-commit] slony1-engine/src/slonik parser.y scan.l slonik.c slonik.h
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list