Chris Browne cbbrowne at lists.slony.info
Wed Jun 17 14:37:40 PDT 2009
Update of /home/cvsd/slony1/slony1-engine/src/backend
In directory main.slony.info:/tmp/cvs-serv2472/src/backend

Modified Files:
      Tag: REL_2_0_STABLE
	slony1_funcs.sql 
Log Message:
Add in OMIT COPY option to SUBSCRIBE SET in support of upgrading from
elder Slony-I versions.


Index: slony1_funcs.sql
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.145.2.10
retrieving revision 1.145.2.11
diff -C2 -d -r1.145.2.10 -r1.145.2.11
*** slony1_funcs.sql	28 Apr 2009 19:25:36 -0000	1.145.2.10
--- slony1_funcs.sql	17 Jun 2009 21:37:38 -0000	1.145.2.11
***************
*** 4100,4106 ****
  
  -- ----------------------------------------------------------------------
! -- FUNCTION subscribeSet (sub_set, sub_provider, sub_receiver, sub_forward)
  -- ----------------------------------------------------------------------
! create or replace function @NAMESPACE at .subscribeSet (int4, int4, int4, bool)
  returns bigint
  as $$
--- 4100,4106 ----
  
  -- ----------------------------------------------------------------------
! -- FUNCTION subscribeSet (sub_set, sub_provider, sub_receiver, sub_forward, omit_copy)
  -- ----------------------------------------------------------------------
! create or replace function @NAMESPACE at .subscribeSet (int4, int4, int4, bool, bool)
  returns bigint
  as $$
***************
*** 4110,4113 ****
--- 4110,4114 ----
  	p_sub_receiver		alias for $3;
  	p_sub_forward		alias for $4;
+ 	p_omit_copy		alias for $5;
  	v_set_origin		int4;
  	v_ev_seqno			int8;
***************
*** 4119,4122 ****
--- 4120,4125 ----
  	lock table @NAMESPACE at .sl_config_lock;
  
+ 	raise notice 'subscribe set: omit_copy=%', p_omit_copy;
+ 
  	-- ----
  	-- Check that this is called on the provider node
***************
*** 4162,4166 ****
  	v_ev_seqno :=  @NAMESPACE at .createEvent('_ at CLUSTERNAME@', 'SUBSCRIBE_SET', 
  			p_sub_set::text, p_sub_provider::text, p_sub_receiver::text, 
! 			case p_sub_forward when true then 't' else 'f' end);
  
  	-- ----
--- 4165,4171 ----
  	v_ev_seqno :=  @NAMESPACE at .createEvent('_ at CLUSTERNAME@', 'SUBSCRIBE_SET', 
  			p_sub_set::text, p_sub_provider::text, p_sub_receiver::text, 
! 			case p_sub_forward when true then 't' else 'f' end,
! 			case p_omit_copy when true then 't' else 'f' end
!                         );
  
  	-- ----
***************
*** 4168,4186 ****
  	-- ----
  	perform @NAMESPACE at .subscribeSet_int(p_sub_set, p_sub_provider,
! 			p_sub_receiver, p_sub_forward);
  
  	return v_ev_seqno;
  end;
  $$ language plpgsql;
! comment on function @NAMESPACE at .subscribeSet (int4, int4, int4, bool) is
! 'subscribeSet (sub_set, sub_provider, sub_receiver, sub_forward)
  
  Makes sure that the receiver is not the provider, then stores the
! subscription, and publishes the SUBSCRIBE_SET event to other nodes.';
  
! -- ----------------------------------------------------------------------
! -- FUNCTION subscribeSet_int (sub_set, sub_provider, sub_receiver, sub_forward)
! -- ----------------------------------------------------------------------
! create or replace function @NAMESPACE at .subscribeSet_int (int4, int4, int4, bool)
  returns int4
  as $$
--- 4173,4194 ----
  	-- ----
  	perform @NAMESPACE at .subscribeSet_int(p_sub_set, p_sub_provider,
! 			p_sub_receiver, p_sub_forward, p_omit_copy);
  
  	return v_ev_seqno;
  end;
  $$ language plpgsql;
! comment on function @NAMESPACE at .subscribeSet (int4, int4, int4, bool, bool) is
! 'subscribeSet (sub_set, sub_provider, sub_receiver, sub_forward, omit_copy)
  
  Makes sure that the receiver is not the provider, then stores the
! subscription, and publishes the SUBSCRIBE_SET event to other nodes.
  
! If omit_copy is true, then no data copy will be done.
! ';
! 
! -- -------------------------------------------------------------------------------------------
! -- FUNCTION subscribeSet_int (sub_set, sub_provider, sub_receiver, sub_forward, omit_copy)
! -- -------------------------------------------------------------------------------------------
! create or replace function @NAMESPACE at .subscribeSet_int (int4, int4, int4, bool, bool)
  returns int4
  as $$
***************
*** 4190,4193 ****
--- 4198,4202 ----
  	p_sub_receiver		alias for $3;
  	p_sub_forward		alias for $4;
+ 	p_omit_copy		alias for $5;
  	v_set_origin		int4;
  	v_sub_row			record;
***************
*** 4198,4201 ****
--- 4207,4212 ----
  	lock table @NAMESPACE at .sl_config_lock;
  
+ 	raise notice 'subscribe set: omit_copy=%', p_omit_copy;
+ 
  	-- ----
  	-- Provider change is only allowed for active sets
***************
*** 4261,4265 ****
  		perform @NAMESPACE at .createEvent('_ at CLUSTERNAME@', 'ENABLE_SUBSCRIPTION', 
  				p_sub_set::text, p_sub_provider::text, p_sub_receiver::text, 
! 				case p_sub_forward when true then 't' else 'f' end);
  		perform @NAMESPACE at .enableSubscription(p_sub_set, 
  				p_sub_provider, p_sub_receiver);
--- 4272,4278 ----
  		perform @NAMESPACE at .createEvent('_ at CLUSTERNAME@', 'ENABLE_SUBSCRIPTION', 
  				p_sub_set::text, p_sub_provider::text, p_sub_receiver::text, 
! 				case p_sub_forward when true then 't' else 'f' end,
! 				case p_omit_copy when true then 't' else 'f' end
! 				);
  		perform @NAMESPACE at .enableSubscription(p_sub_set, 
  				p_sub_provider, p_sub_receiver);
***************
*** 4275,4280 ****
  $$ language plpgsql;
  
! comment on function @NAMESPACE at .subscribeSet_int (int4, int4, int4, bool) is
! 'subscribeSet_int (sub_set, sub_provider, sub_receiver, sub_forward)
  
  Internal actions for subscribing receiver sub_receiver to subscription
--- 4288,4293 ----
  $$ language plpgsql;
  
! comment on function @NAMESPACE at .subscribeSet_int (int4, int4, int4, bool, bool) is
! 'subscribeSet_int (sub_set, sub_provider, sub_receiver, sub_forward, omit_copy)
  
  Internal actions for subscribing receiver sub_receiver to subscription
***************
*** 4405,4409 ****
  
  -- ----------------------------------------------------------------------
! -- FUNCTION enableSubscription (sub_set, sub_provider, sub_receiver)
  -- ----------------------------------------------------------------------
  create or replace function @NAMESPACE at .enableSubscription (int4, int4, int4)
--- 4418,4422 ----
  
  -- ----------------------------------------------------------------------
! -- FUNCTION enableSubscription (sub_set, sub_provider, sub_receiver, omit_copy)
  -- ----------------------------------------------------------------------
  create or replace function @NAMESPACE at .enableSubscription (int4, int4, int4)
***************
*** 4427,4433 ****
  enableSubscription_int (sub_set, sub_provider, sub_receiver).';
  
! -- ----------------------------------------------------------------------
  -- FUNCTION enableSubscription_int (sub_set, sub_provider, sub_receiver)
! -- ----------------------------------------------------------------------
  create or replace function @NAMESPACE at .enableSubscription_int (int4, int4, int4)
  returns int4
--- 4440,4446 ----
  enableSubscription_int (sub_set, sub_provider, sub_receiver).';
  
! -- -----------------------------------------------------------------------------------
  -- FUNCTION enableSubscription_int (sub_set, sub_provider, sub_receiver)
! -- -----------------------------------------------------------------------------------
  create or replace function @NAMESPACE at .enableSubscription_int (int4, int4, int4)
  returns int4



More information about the Slony1-commit mailing list