Chris Browne cbbrowne at lists.slony.info
Mon Feb 23 09:58:56 PST 2009
Update of /home/cvsd/slony1/slony1-engine/src/backend
In directory main.slony.info:/tmp/cvs-serv4965

Modified Files:
      Tag: REL_2_0_STABLE
	slony1_funcs.sql 
Log Message:
Trim out obsolete code in "upgrade functions" function


Index: slony1_funcs.sql
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.145.2.5
retrieving revision 1.145.2.6
diff -C2 -d -r1.145.2.5 -r1.145.2.6
*** slony1_funcs.sql	23 Feb 2009 17:47:33 -0000	1.145.2.5
--- slony1_funcs.sql	23 Feb 2009 17:58:53 -0000	1.145.2.6
***************
*** 5390,5452 ****
  		v_tab_row	record;
  begin
! 	-- ----
! 	-- Changes for 2.0
! 	-- ----
! 	if p_old IN ('1.0.2', '1.0.5', '1.0.6',
! 			'1.1.0', '1.1.1', '1.1.2', '1.1.3', '1.1.5', '1.1.6', '1.1.7', '1.1.8', '1.1.9') then
! 		raise exception 'Upgrading to Slony-I 2.x requires running 1.2.x';
! 	end if;
! 
! 	if p_old IN ('1.2.0', '1.2.1', '1.2.2', '1.2.3', '1.2.4', '1.2.5', '1.2.6', '1.2.7', '1.2.8', '1.2.9', '1.2.10', '1.2.11', '1.2.12', '1.2.13', '1.2.14', '1.2.15', '1.2.16') then
! 		-- ---- 
! 		-- Upgrading from a pre-2.0 ... repair the system catalog
! 		-- ----
! 		for v_tab_row in select * from @NAMESPACE at .sl_table order by tab_id loop
! 			perform @NAMESPACE at .alterTableRestore(v_tab_row.tab_id);
! 		end loop;
! 
! 		-- ----
! 		-- drop obsolete functions
! 		-- ----
! 		execute 'drop function @NAMESPACE at .alterTableForReplication(int4)';
! 		execute 'drop function @NAMESPACE at .pre74()';
! 
! 		-- ----
! 		-- and create the new versions of the log and deny access triggers.
! 		-- ----
! 		for v_tab_row in select * from @NAMESPACE at .sl_table order by tab_id loop
! 			perform @NAMESPACE at .alterTableAddTriggers(v_tab_row.tab_id);
! 			perform @NAMESPACE at .alterTableConfigureTriggers(v_tab_row.tab_id);
! 		end loop;
! 
! 		-- ----
! 		-- Drop no_spool from sl_node
! 		-- ----
! 		execute 'alter table @NAMESPACE at .sl_node drop column no_spool;';
! 
! 		-- ----
! 		-- Drop sl_trigger
! 		-- ----
! 		execute 'drop table @NAMESPACE at .sl_trigger;';
! 
! 		execute 'alter table @NAMESPACE at .sl_event add column ev_snapshot "pg_catalog".txid_snapshot;';
! 		execute 'alter table @NAMESPACE at .sl_set_sync add column ev_snapshot "pg_catalog".txid_snapshot;';
! 	end if;
! 
! 	-- ----
! 	-- The following is already in 1.2.11, do not add any future
! 	-- 1.2 version numbers.
! 	-- ----
! 	if p_old IN ('1.2.0', '1.2.1', '1.2.2', '1.2.3', '1.2.4', '1.2.5', '1.2.6', '1.2.7', '1.2.8', '1.2.9', '1.2.10') then
! 		-- ----
! 		-- Add new table sl_archive_counter
! 		-- ----
! 		execute 'create table @NAMESPACE at .sl_archive_counter (
! 					ac_num			bigint,
! 					ac_timestamp	timestamp
! 				) without oids';
! 		execute 'insert into @NAMESPACE at .sl_archive_counter
! 				(ac_num, ac_timestamp) values (0, ' || pg_catalog.quote_literal('epoch') || '::timestamp)';
! 
  	end if;
  
--- 5390,5396 ----
  		v_tab_row	record;
  begin
! 	-- If old version is pre-2.0, then we require a special upgrade process
! 	if p_old like '1.%' then
! 		raise exception 'Upgrading to Slony-I 2.x requires running slony_upgrade_20';
  	end if;
  



More information about the Slony1-commit mailing list