Chris Browne cbbrowne at lists.slony.info
Tue Aug 28 12:18:14 PDT 2007
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv21213

Modified Files:
      Tag: REL_1_2_STABLE
	schemadoc.xml 
Log Message:
Commit latest version of schema docs


Index: schemadoc.xml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/schemadoc.xml,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -d -r1.7 -r1.7.2.1
*** schemadoc.xml	31 Jul 2006 18:56:24 -0000	1.7
--- schemadoc.xml	28 Aug 2007 19:18:12 -0000	1.7.2.1
***************
*** 1,2 ****
--- 1,3 ----
+ <?xml version="1.0" encoding="UTF-8" ?>
  <!-- $Header$ -->
  
***************
*** 12,15 ****
--- 13,92 ----
  
  
+       <section id="table.sl-archive-counter"
+                xreflabel="sl_archive_counter">
+         <title id="table.sl-archive-counter-title">
+          Table:
+          
+          <structname>sl_archive_counter</structname>
+         </title>
+  
+ 
+         <para>
+           Table used to generate the log shipping archive number.
+ 
+         </para>
+ 
+ 
+         <para>
+           <variablelist>
+             <title>
+               Structure of <structname>sl_archive_counter</structname>
+             </title>
+ 
+ 
+             <varlistentry>
+               <term><structfield>ac_num</structfield></term>
+               <listitem><para>
+                 <type>bigint</type>
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+               </para>
+ 
+               <para>
+                 Counter of SYNC ID used in log shipping as the archive number
+               </para>
+ 
+             </listitem>
+           </varlistentry>
+ 
+             <varlistentry>
+               <term><structfield>ac_timestamp</structfield></term>
+               <listitem><para>
+                 <type>timestamp without time zone</type>
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+               </para>
+ 
+               <para>
+                 Time at which the archive log was generated on the subscriber
+               </para>
+ 
+             </listitem>
+           </varlistentry>
+ 
+         </variablelist>
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+       </para>
+     </section>
+ 
        <section id="table.sl-config-lock"
                 xreflabel="sl_config_lock">
***************
*** 47,50 ****
--- 124,131 ----
                </para>
  
+               <para>
+                 No data ever goes in this table so the contents never matter.  Indeed, this column does not really need to exist.
+               </para>
+ 
              </listitem>
            </varlistentry>
***************
*** 3037,3042 ****
--- 3118,3125 ----
  	v_log			int4;
  	v_dummy		record;
+ 	v_dummy2	record;
  	idef 		text;
  	v_count		int4;
+         v_iname         text;
  BEGIN
  	v_count := 0;
***************
*** 3053,3076 ****
  		v_log := 1;
  	end if;
! 
  	-- Add missing indices...
! 	for v_dummy in select distinct set_origin from sl_set
! 		where not exists 
!                      (select * from pg_catalog.pg_indexes where schemaname = &#39;schemadoc&#39;
!                       and tablename = &#39;sl_log_&#39; || v_log and 
!                       indexname = &#39;PartInd_schemadoc_sl_log_&#39; || v_log || &#39;-node-&#39; || set_origin) loop	   
  		idef := &#39;create index &quot;PartInd_schemadoc_sl_log_&#39; || v_log || &#39;-node-&#39; || v_dummy.set_origin ||
                          &#39;&quot; on sl_log_&#39; || v_log || &#39; USING btree(log_xid xxid_ops) where (log_origin = &#39; || v_dummy.set_origin || &#39;);&#39;;
  		execute idef;
  		v_count := v_count + 1;
  	end loop;
  
  	-- Remove unneeded indices...
! 	for v_dummy in select indexname from pg_catalog.pg_indexes i where i.schemaname = &#39;@NAMESPACE&#39;
!                        and i.tablename = &#39;sl_log_&#39; || v_log and
                         not exists (select 1 from sl_set where
  				i.indexname = &#39;PartInd_schemadoc_sl_log_&#39; || v_log || &#39;-node-&#39; || set_origin)
  	loop
! 		idef := &#39;drop index &quot;schemadoc&quot;.&quot;&#39; || v_dummy.indexname || &#39;&quot;;&#39;;
  		execute idef;
  		v_count := v_count - 1;
--- 3136,3165 ----
  		v_log := 1;
  	end if;
! --                                       PartInd_test_db_sl_log_2-node-1
  	-- Add missing indices...
! 	for v_dummy in select distinct set_origin from sl_set loop
!             v_iname := &#39;PartInd_schemadoc_sl_log_&#39; || v_log || &#39;-node-&#39; || v_dummy.set_origin;
! 	    -- raise notice &#39;Consider adding partial index % on sl_log_%&#39;, v_iname, v_log;
! 	    -- raise notice &#39;schema: [_schemadoc] tablename:[sl_log_%]&#39;, v_log;
!             select * into v_dummy2 from pg_catalog.pg_indexes where tablename = &#39;sl_log_&#39; || v_log and  indexname = v_iname;
!             if not found then
! 		-- raise notice &#39;index was not found - add it!&#39;;
  		idef := &#39;create index &quot;PartInd_schemadoc_sl_log_&#39; || v_log || &#39;-node-&#39; || v_dummy.set_origin ||
                          &#39;&quot; on sl_log_&#39; || v_log || &#39; USING btree(log_xid xxid_ops) where (log_origin = &#39; || v_dummy.set_origin || &#39;);&#39;;
  		execute idef;
  		v_count := v_count + 1;
+             else
+                 -- raise notice &#39;Index % already present - skipping&#39;, v_iname;
+             end if;
  	end loop;
  
  	-- Remove unneeded indices...
! 	for v_dummy in select indexname from pg_catalog.pg_indexes i where i.tablename = &#39;sl_log_&#39; || v_log and
!                        i.indexname like (&#39;PartInd_schemadoc_sl_log_&#39; || v_log || &#39;-node-%&#39;) and
                         not exists (select 1 from sl_set where
  				i.indexname = &#39;PartInd_schemadoc_sl_log_&#39; || v_log || &#39;-node-&#39; || set_origin)
  	loop
! 		-- raise notice &#39;Dropping obsolete index %d&#39;, v_dummy.indexname;
! 		idef := &#39;drop index &quot;&#39; || v_dummy.indexname || &#39;&quot;;&#39;;
  		execute idef;
  		v_count := v_count - 1;
***************
*** 3538,3541 ****
--- 3627,3633 ----
          end if;
  
+ 	if exists (select * from &quot;pg_catalog&quot;.pg_class c, &quot;pg_catalog&quot;.pg_namespace n, &quot;pg_catalog&quot;.pg_attribute a where c.relname = &#39;sl_seqlog&#39; and n.oid = c.relnamespace and a.attrelid = c.oid and a.attname = &#39;oid&#39;) then
+                 execute &#39;alter table sl_seqlog set without oids;&#39;;
+ 	end if;		
  	-- ----
  	-- Also remove stale entries from the nodelock table.
***************
*** 3938,3943 ****
  begin
  	perform updateRelname(p_set_id, p_only_on_node);
! 	return  createEvent(&#39;_schemadoc&#39;, &#39;DDL_SCRIPT&#39;, 
! 			p_set_id, p_script, p_only_on_node);
  end;
  </programlisting>
--- 4030,4042 ----
  begin
  	perform updateRelname(p_set_id, p_only_on_node);
! 	if p_only_on_node = -1 then
! 		perform alterTableForReplication(tab_id) from sl_table where tab_set in (select set_id from sl_set where set_origin = getLocalNodeId(&#39;_schemadoc&#39;));
! 
! 		return  createEvent(&#39;_schemadoc&#39;, &#39;DDL_SCRIPT&#39;, 
! 			p_set_id::text, p_script::text, p_only_on_node::text);
! 	else
! 		perform alterTableForReplication(tab_id) from sl_table;
! 	end if;
! 	return NULL;
  end;
  </programlisting>
***************
*** 4025,4030 ****
--- 4124,4132 ----
  	lock table sl_config_lock;
  
+ 	
  	-- ----
  	-- Check that the set exists and originates here
+ 	-- unless only_on_node was specified (then it can be applied to
+ 	-- that node because that is what the user wanted)
  	-- ----
  	select set_origin into v_set_origin
***************
*** 4035,4047 ****
  		raise exception &#39;Slony-I: set % not found&#39;, p_set_id;
  	end if;
! 	if v_set_origin &lt;&gt; getLocalNodeId(&#39;_schemadoc&#39;) then
! 		raise exception &#39;Slony-I: set % does not originate on local node&#39;,
  				p_set_id;
  	end if;
- 
- 	-- ----
- 	-- Create a SYNC event, run the script and generate the DDL_SCRIPT event
- 	-- ----
- 	perform createEvent(&#39;_schemadoc&#39;, &#39;SYNC&#39;, NULL);
  	return 1;
  end;
--- 4137,4157 ----
  		raise exception &#39;Slony-I: set % not found&#39;, p_set_id;
  	end if;
! 
! 	if p_only_on_node = -1 then
! 		if v_set_origin &lt;&gt; getLocalNodeId(&#39;_schemadoc&#39;) then
! 			raise exception &#39;Slony-I: set % does not originate on local node&#39;,
  				p_set_id;
+ 		end if;
+ 		-- ----
+ 		-- Create a SYNC event, run the script and generate the DDL_SCRIPT event
+ 		-- ----
+ 		perform createEvent(&#39;_schemadoc&#39;, &#39;SYNC&#39;, NULL);
+ 		perform alterTableRestore(tab_id) from sl_table where tab_set in (select set_id from sl_set where set_origin = getLocalNodeId(&#39;_schemadoc&#39;));
+ 	else
+ 		-- ----
+ 		-- If doing &quot;only on one node&quot; - restore ALL tables irrespective of set
+ 		-- ----
+ 		perform alterTableRestore(tab_id) from sl_table;
  	end if;
  	return 1;
  end;
***************
*** 4148,4152 ****
          <seglistitem>
           <seg>C</seg>
!          <seg>&quot;trigger&quot;</seg>
          </seglistitem>
         </segmentedlist>
--- 4258,4262 ----
          <seglistitem>
           <seg>C</seg>
!          <seg>trigger</seg>
          </seglistitem>
         </segmentedlist>
***************
*** 4639,4643 ****
  	
  	return  createEvent (&#39;_schemadoc&#39;, &#39;DROP_LISTEN&#39;,
! 			p_li_origin, p_li_provider, p_li_receiver);
  end;
  </programlisting>
--- 4749,4753 ----
  	
  	return  createEvent (&#39;_schemadoc&#39;, &#39;DROP_LISTEN&#39;,
! 			p_li_origin::text, p_li_provider::text, p_li_receiver::text);
  end;
  </programlisting>
***************
*** 4768,4772 ****
  	perform dropNode_int(p_no_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;DROP_NODE&#39;,
! 									p_no_id);
  end;
  </programlisting>
--- 4878,4882 ----
  	perform dropNode_int(p_no_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;DROP_NODE&#39;,
! 									p_no_id::text);
  end;
  </programlisting>
***************
*** 4918,4922 ****
  
  	return  createEvent (&#39;_schemadoc&#39;, &#39;DROP_PATH&#39;,
! 			p_pa_server, p_pa_client);
  end;
  </programlisting>
--- 5028,5032 ----
  
  	return  createEvent (&#39;_schemadoc&#39;, &#39;DROP_PATH&#39;,
! 			p_pa_server::text, p_pa_client::text);
  end;
  </programlisting>
***************
*** 5039,5043 ****
  	perform dropSet_int(p_set_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;DROP_SET&#39;, 
! 			p_set_id);
  end;
  </programlisting>
--- 5149,5153 ----
  	perform dropSet_int(p_set_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;DROP_SET&#39;, 
! 			p_set_id::text);
  end;
  </programlisting>
***************
*** 5149,5153 ****
  	perform dropTrigger_int(p_trig_tabid, p_trig_tgname);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;DROP_TRIGGER&#39;,
! 			p_trig_tabid, p_trig_tgname);
  end;
  </programlisting>
--- 5259,5263 ----
  	perform dropTrigger_int(p_trig_tabid, p_trig_tgname);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;DROP_TRIGGER&#39;,
! 			p_trig_tabid::text, p_trig_tgname::text);
  end;
  </programlisting>
***************
*** 5289,5293 ****
  	perform enableNode_int (p_no_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;ENABLE_NODE&#39;,
! 									p_no_id);
  end;
  </programlisting>
--- 5399,5403 ----
  	perform enableNode_int (p_no_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;ENABLE_NODE&#39;,
! 									p_no_id::text);
  end;
  </programlisting>
***************
*** 5776,5780 ****
  
  	perform failoverSet_int(p_failed_node,
! 			p_backup_node, p_set_id);
  
  	return p_ev_seqfake;
--- 5886,5890 ----
  
  	perform failoverSet_int(p_failed_node,
! 			p_backup_node, p_set_id, p_ev_seqfake);
  
  	return p_ev_seqfake;
***************
*** 5784,5795 ****
      </section>
  
! <!-- Function failoverset_int( integer, integer, integer ) -->
!     <section id="function.failoverset-int-integer-integer-integer"
!              xreflabel="schemadocfailoverset_int( integer, integer, integer )">
!       <title id="function.failoverset-int-integer-integer-integer-title">
!        failoverset_int( integer, integer, integer )
        </title>
!       <titleabbrev id="function.failoverset-int-integer-integer-integer-titleabbrev">
!        failoverset_int( integer, integer, integer )
        </titleabbrev>
  
--- 5894,5905 ----
      </section>
  
! <!-- Function failoverset_int( integer, integer, integer, bigint ) -->
!     <section id="function.failoverset-int-integer-integer-integer-bigint"
!              xreflabel="schemadocfailoverset_int( integer, integer, integer, bigint )">
!       <title id="function.failoverset-int-integer-integer-integer-bigint-title">
!        failoverset_int( integer, integer, integer, bigint )
        </title>
!       <titleabbrev id="function.failoverset-int-integer-integer-integer-bigint-titleabbrev">
!        failoverset_int( integer, integer, integer, bigint )
        </titleabbrev>
  
***************
*** 5806,5810 ****
         </segmentedlist>
   
!        FUNCTION failoverSet_int (failed_node, backup_node, set_id)
  
  Finish failover for one set.
--- 5916,5920 ----
         </segmentedlist>
   
!        FUNCTION failoverSet_int (failed_node, backup_node, set_id, wait_seqno)
  
  Finish failover for one set.
***************
*** 5814,5817 ****
--- 5924,5928 ----
  	p_backup_node		alias for $2;
  	p_set_id			alias for $3;
+ 	p_wait_seqno		alias for $4;
  	v_row				record;
  	v_last_sync			int8;
***************
*** 5851,5860 ****
  				(ev_origin, ev_seqno, ev_timestamp,
  				ev_minxid, ev_maxxid, ev_xip,
! 				ev_type, ev_data1, ev_data2, ev_data3)
  				values
  				(p_backup_node, &quot;pg_catalog&quot;.nextval(&#39;sl_event_seq&#39;), CURRENT_TIMESTAMP,
  				&#39;0&#39;, &#39;0&#39;, &#39;&#39;,
  				&#39;ACCEPT_SET&#39;, p_set_id::text,
! 				p_failed_node::text, p_backup_node::text);
  	else
  		delete from sl_subscribe
--- 5962,5972 ----
  				(ev_origin, ev_seqno, ev_timestamp,
  				ev_minxid, ev_maxxid, ev_xip,
! 				ev_type, ev_data1, ev_data2, ev_data3, ev_data4)
  				values
  				(p_backup_node, &quot;pg_catalog&quot;.nextval(&#39;sl_event_seq&#39;), CURRENT_TIMESTAMP,
  				&#39;0&#39;, &#39;0&#39;, &#39;&#39;,
  				&#39;ACCEPT_SET&#39;, p_set_id::text,
! 				p_failed_node::text, p_backup_node::text,
! 				p_wait_seqno::text);
  	else
  		delete from sl_subscribe
***************
*** 5994,6002 ****
  BEGIN
  	select 1 into v_node_row from sl_event 
!        	  where ev_type = &#39;SYNC&#39; and ev_origin = getLocalNodeId(&#39;schemadoc&#39;)
            and ev_timestamp &gt; now() - p_interval limit 1;
  	if not found then
  		-- If there has been no SYNC in the last interval, then push one
! 		perform createEvent(&#39;schemadoc&#39;, &#39;SYNC&#39;, NULL);
  		return 1;
  	else
--- 6106,6114 ----
  BEGIN
  	select 1 into v_node_row from sl_event 
!        	  where ev_type = &#39;SYNC&#39; and ev_origin = getLocalNodeId(&#39;_schemadoc&#39;)
            and ev_timestamp &gt; now() - p_interval limit 1;
  	if not found then
  		-- If there has been no SYNC in the last interval, then push one
! 		perform createEvent(&#39;_schemadoc&#39;, &#39;SYNC&#39;, NULL);
  		return 1;
  	else
***************
*** 6196,6200 ****
          <seglistitem>
           <seg>C</seg>
!          <seg>&quot;trigger&quot;</seg>
          </seglistitem>
         </segmentedlist>
--- 6308,6312 ----
          <seglistitem>
           <seg>C</seg>
!          <seg>trigger</seg>
          </seglistitem>
         </segmentedlist>
***************
*** 6362,6365 ****
--- 6474,6480 ----
  		raise notice &#39;Slony-I: log switch to sl_log_1 complete - truncate sl_log_2&#39;;
  		truncate sl_log_2;
+ 		if exists (select * from &quot;pg_catalog&quot;.pg_class c, &quot;pg_catalog&quot;.pg_namespace n, &quot;pg_catalog&quot;.pg_attribute a where c.relname = &#39;sl_log_2&#39; and n.oid = c.relnamespace and a.attrelid = c.oid and a.attname = &#39;oid&#39;) then
+ 	                execute &#39;alter table sl_log_2 set without oids;&#39;;
+ 		end if;		
  		perform &quot;pg_catalog&quot;.setval(&#39;sl_log_status&#39;, 0);
  		-- Run addPartialLogIndices() to try to add indices to unused sl_log_? table
***************
*** 6388,6391 ****
--- 6503,6509 ----
  		raise notice &#39;Slony-I: log switch to sl_log_2 complete - truncate sl_log_1&#39;;
  		truncate sl_log_1;
+ 		if exists (select * from &quot;pg_catalog&quot;.pg_class c, &quot;pg_catalog&quot;.pg_namespace n, &quot;pg_catalog&quot;.pg_attribute a where c.relname = &#39;sl_log_1&#39; and n.oid = c.relnamespace and a.attrelid = c.oid and a.attname = &#39;oid&#39;) then
+ 	                execute &#39;alter table sl_log_1 set without oids;&#39;;
+ 		end if;		
  		perform &quot;pg_catalog&quot;.setval(&#39;sl_log_status&#39;, 1);
  		-- Run addPartialLogIndices() to try to add indices to unused sl_log_? table
***************
*** 6575,6579 ****
          <seglistitem>
           <seg>C</seg>
!          <seg>&quot;trigger&quot;</seg>
          </seglistitem>
         </segmentedlist>
--- 6693,6697 ----
          <seglistitem>
           <seg>C</seg>
!          <seg>trigger</seg>
          </seglistitem>
         </segmentedlist>
***************
*** 6672,6675 ****
--- 6790,6808 ----
  
  	-- ----
+ 	-- Check that all ENABLE_SUBSCRIPTION events for the set are confirmed
+ 	-- ----
+ 	if exists (select true from sl_event
+ 			where ev_type = &#39;ENABLE_SUBSCRIPTION&#39;
+ 			and ev_data1 = p_add_id::text
+ 			and ev_seqno &gt; (select max(con_seqno) from sl_confirm
+ 					where con_origin = ev_origin
+ 					and con_received::text = ev_data3))
+ 	then
+ 		raise exception &#39;Slony-I: set % has subscriptions in progress - cannot merge&#39;,
+ 				p_add_id;
+ 	end if;
+ 			  
+ 
+ 	-- ----
  	-- Create a SYNC event, merge the sets, create a MERGE_SET event
  	-- ----
***************
*** 6677,6681 ****
  	perform mergeSet_int(p_set_id, p_add_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;MERGE_SET&#39;, 
! 			p_set_id, p_add_id);
  end;
  </programlisting>
--- 6810,6814 ----
  	perform mergeSet_int(p_set_id, p_add_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;MERGE_SET&#39;, 
! 			p_set_id::text, p_add_id::text);
  end;
  </programlisting>
***************
*** 6823,6827 ****
  	-- ----
  	perform moveSet_int(p_set_id, v_local_node_id,
! 			p_new_origin);
  
  	perform RebuildListenEntries();
--- 6956,6960 ----
  	-- ----
  	perform moveSet_int(p_set_id, v_local_node_id,
! 			p_new_origin, 0);
  
  	perform RebuildListenEntries();
***************
*** 6843,6847 ****
  	-- ----
  	return createEvent(&#39;_schemadoc&#39;, &#39;MOVE_SET&#39;, 
! 			p_set_id, v_local_node_id, p_new_origin);
  end;
  </programlisting>
--- 6976,6980 ----
  	-- ----
  	return createEvent(&#39;_schemadoc&#39;, &#39;MOVE_SET&#39;, 
! 			p_set_id::text, v_local_node_id::text, p_new_origin::text);
  end;
  </programlisting>
***************
*** 6849,6860 ****
      </section>
  
! <!-- Function moveset_int( integer, integer, integer ) -->
!     <section id="function.moveset-int-integer-integer-integer"
!              xreflabel="schemadocmoveset_int( integer, integer, integer )">
!       <title id="function.moveset-int-integer-integer-integer-title">
!        moveset_int( integer, integer, integer )
        </title>
!       <titleabbrev id="function.moveset-int-integer-integer-integer-titleabbrev">
!        moveset_int( integer, integer, integer )
        </titleabbrev>
  
--- 6982,6993 ----
      </section>
  
! <!-- Function moveset_int( integer, integer, integer, bigint ) -->
!     <section id="function.moveset-int-integer-integer-integer-bigint"
!              xreflabel="schemadocmoveset_int( integer, integer, integer, bigint )">
!       <title id="function.moveset-int-integer-integer-integer-bigint-title">
!        moveset_int( integer, integer, integer, bigint )
        </title>
!       <titleabbrev id="function.moveset-int-integer-integer-integer-bigint-titleabbrev">
!        moveset_int( integer, integer, integer, bigint )
        </titleabbrev>
  
***************
*** 6871,6875 ****
         </segmentedlist>
   
!        moveSet(set_id, old_origin, new_origin)
  
  Process MOVE_SET event to request that the origin for set set_id be
--- 7004,7008 ----
         </segmentedlist>
   
!        moveSet(set_id, old_origin, new_origin, wait_seqno)
  
  Process MOVE_SET event to request that the origin for set set_id be
***************
*** 6880,6883 ****
--- 7013,7017 ----
  	p_old_origin		alias for $2;
  	p_new_origin		alias for $3;
+ 	p_wait_seqno		alias for $4;
  	v_local_node_id		int4;
  	v_tab_row			record;
***************
*** 6913,6919 ****
  	-- On the new origin, raise an event - ACCEPT_SET
  	if v_local_node_id = p_new_origin then
! 		
  		perform createEvent(&#39;_schemadoc&#39;, &#39;ACCEPT_SET&#39;, 
! 			p_set_id, p_old_origin, p_new_origin);
  	end if;
  
--- 7047,7058 ----
  	-- On the new origin, raise an event - ACCEPT_SET
  	if v_local_node_id = p_new_origin then
! 		-- Create a SYNC event as well so that the ACCEPT_SET has
! 		-- the same snapshot as the last SYNC generated by the new
! 		-- origin. This snapshot will be used by other nodes to
! 		-- finalize the setsync status.
! 		perform createEvent(&#39;_schemadoc&#39;, &#39;SYNC&#39;, NULL);
  		perform createEvent(&#39;_schemadoc&#39;, &#39;ACCEPT_SET&#39;, 
! 			p_set_id::text, p_old_origin::text, 
! 			p_new_origin::text, p_wait_seqno::text);
  	end if;
  
***************
*** 7693,7697 ****
  			p_seq_comment);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_ADD_SEQUENCE&#39;,
! 			p_set_id, p_seq_id, p_fqname, p_seq_comment);
  end;
  </programlisting>
--- 7832,7837 ----
  			p_seq_comment);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_ADD_SEQUENCE&#39;,
! 						p_set_id::text, p_seq_id::text, 
! 						p_fqname::text, p_seq_comment::text);
  end;
  </programlisting>
***************
*** 7892,7897 ****
  			p_tab_idxname, p_tab_comment);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_ADD_TABLE&#39;,
! 			p_set_id, p_tab_id, p_fqname,
! 			p_tab_idxname, p_tab_comment);
  end;
  </programlisting>
--- 8032,8037 ----
  			p_tab_idxname, p_tab_comment);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_ADD_TABLE&#39;,
! 			p_set_id::text, p_tab_id::text, p_fqname::text,
! 			p_tab_idxname::text, p_tab_comment::text);
  end;
  </programlisting>
***************
*** 8112,8116 ****
  	perform setDropSequence_int(p_seq_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_DROP_SEQUENCE&#39;,
! 			p_seq_id);
  end;
  </programlisting>
--- 8252,8256 ----
  	perform setDropSequence_int(p_seq_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_DROP_SEQUENCE&#39;,
! 					p_seq_id::text);
  end;
  </programlisting>
***************
*** 8274,8278 ****
  	-- ----
  	perform setDropTable_int(p_tab_id);
! 	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_DROP_TABLE&#39;, p_tab_id);
  end;
  </programlisting>
--- 8414,8419 ----
  	-- ----
  	perform setDropTable_int(p_tab_id);
! 	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_DROP_TABLE&#39;, 
! 				p_tab_id::text);
  end;
  </programlisting>
***************
*** 8468,8472 ****
  	perform setMoveSequence_int(p_seq_id, p_new_set_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_MOVE_SEQUENCE&#39;, 
! 			p_seq_id, p_new_set_id);
  end;
  </programlisting>
--- 8609,8613 ----
  	perform setMoveSequence_int(p_seq_id, p_new_set_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_MOVE_SEQUENCE&#39;, 
! 			p_seq_id::text, p_new_set_id::text);
  end;
  </programlisting>
***************
*** 8622,8626 ****
  	perform setMoveTable_int(p_tab_id, p_new_set_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_MOVE_TABLE&#39;, 
! 			p_tab_id, p_new_set_id);
  end;
  </programlisting>
--- 8763,8767 ----
  	perform setMoveTable_int(p_tab_id, p_new_set_id);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;SET_MOVE_TABLE&#39;, 
! 			p_tab_id::text, p_new_set_id::text);
  end;
  </programlisting>
***************
*** 8951,8955 ****
          <programlisting>
  begin
! 	return 0;
  end;
  </programlisting>
--- 9092,9096 ----
          <programlisting>
  begin
! 	return 11;
  end;
  </programlisting>
***************
*** 8992,8996 ****
  	perform storeListen_int (p_origin, p_provider, p_receiver);
  	return  createEvent (&#39;_schemadoc&#39;, &#39;STORE_LISTEN&#39;,
! 			p_origin, p_provider, p_receiver);
  end;
  </programlisting>
--- 9133,9137 ----
  	perform storeListen_int (p_origin, p_provider, p_receiver);
  	return  createEvent (&#39;_schemadoc&#39;, &#39;STORE_LISTEN&#39;,
! 			p_origin::text, p_provider::text, p_receiver::text);
  end;
  </programlisting>
***************
*** 9113,9117 ****
  	perform storeNode_int (p_no_id, p_no_comment, p_no_spool);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;STORE_NODE&#39;,
! 									p_no_id, p_no_comment, v_no_spool_txt);
  end;
  </programlisting>
--- 9254,9259 ----
  	perform storeNode_int (p_no_id, p_no_comment, p_no_spool);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;STORE_NODE&#39;,
! 									p_no_id::text, p_no_comment::text, 
! 									v_no_spool_txt::text);
  end;
  </programlisting>
***************
*** 9224,9228 ****
  			p_pa_conninfo, p_pa_connretry);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;STORE_PATH&#39;, 
! 			p_pa_server, p_pa_client, p_pa_conninfo, p_pa_connretry);
  end;
  </programlisting>
--- 9366,9371 ----
  			p_pa_conninfo, p_pa_connretry);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;STORE_PATH&#39;, 
! 			p_pa_server::text, p_pa_client::text, 
! 			p_pa_conninfo::text, p_pa_connretry::text);
  end;
  </programlisting>
***************
*** 9357,9361 ****
  
  	return createEvent(&#39;_schemadoc&#39;, &#39;STORE_SET&#39;, 
! 			p_set_id, v_local_node_id, p_set_comment);
  end;
  </programlisting>
--- 9500,9504 ----
  
  	return createEvent(&#39;_schemadoc&#39;, &#39;STORE_SET&#39;, 
! 			p_set_id::text, v_local_node_id::text, p_set_comment::text);
  end;
  </programlisting>
***************
*** 9461,9465 ****
  	perform storeTrigger_int(p_trig_tabid, p_trig_tgname);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;STORE_TRIGGER&#39;,
! 			p_trig_tabid, p_trig_tgname);
  end;
  </programlisting>
--- 9604,9608 ----
  	perform storeTrigger_int(p_trig_tabid, p_trig_tgname);
  	return  createEvent(&#39;_schemadoc&#39;, &#39;STORE_TRIGGER&#39;,
! 			p_trig_tabid::text, p_trig_tgname::text);
  end;
  </programlisting>
***************
*** 9632,9636 ****
  	-- ----
  	v_ev_seqno :=  createEvent(&#39;_schemadoc&#39;, &#39;SUBSCRIBE_SET&#39;, 
! 			p_sub_set, p_sub_provider, p_sub_receiver, 
  			case p_sub_forward when true then &#39;t&#39; else &#39;f&#39; end);
  
--- 9775,9779 ----
  	-- ----
  	v_ev_seqno :=  createEvent(&#39;_schemadoc&#39;, &#39;SUBSCRIBE_SET&#39;, 
! 			p_sub_set::text, p_sub_provider::text, p_sub_receiver::text, 
  			case p_sub_forward when true then &#39;t&#39; else &#39;f&#39; end);
  
***************
*** 9749,9753 ****
  	if v_set_origin = getLocalNodeId(&#39;_schemadoc&#39;) then
  		perform createEvent(&#39;_schemadoc&#39;, &#39;ENABLE_SUBSCRIPTION&#39;, 
! 				p_sub_set, p_sub_provider, p_sub_receiver, 
  				case p_sub_forward when true then &#39;t&#39; else &#39;f&#39; end);
  		perform enableSubscription(p_sub_set, 
--- 9892,9896 ----
  	if v_set_origin = getLocalNodeId(&#39;_schemadoc&#39;) then
  		perform createEvent(&#39;_schemadoc&#39;, &#39;ENABLE_SUBSCRIPTION&#39;, 
! 				p_sub_set::text, p_sub_provider::text, p_sub_receiver::text, 
  				case p_sub_forward when true then &#39;t&#39; else &#39;f&#39; end);
  		perform enableSubscription(p_sub_set, 
***************
*** 10260,10264 ****
  	-- ----
  	return  createEvent(&#39;_schemadoc&#39;, &#39;UNSUBSCRIBE_SET&#39;, 
! 			p_sub_set, p_sub_receiver);
  end;
  </programlisting>
--- 10403,10407 ----
  	-- ----
  	return  createEvent(&#39;_schemadoc&#39;, &#39;UNSUBSCRIBE_SET&#39;, 
! 			p_sub_set::text, p_sub_receiver::text);
  end;
  </programlisting>
***************
*** 10478,10482 ****
  
          return  createEvent(&#39;_schemadoc&#39;, &#39;RESET_CONFIG&#39;,
!                         p_set_id, p_only_on_node);
  end;
  </programlisting>
--- 10621,10625 ----
  
          return  createEvent(&#39;_schemadoc&#39;, &#39;RESET_CONFIG&#39;,
!                         p_set_id::text, p_only_on_node::text);
  end;
  </programlisting>
***************
*** 10580,10584 ****
  	-- Changes for 1.2
  	-- ----
! 	if p_old IN (&#39;1.0.2&#39;, &#39;1.0.5&#39;, &#39;1.0.6&#39;, &#39;1.1.0&#39;, &#39;1.1.1&#39;, &#39;1.1.2&#39;, &#39;1.1.3&#39;) then
  		-- Add new table sl_registry
  		execute &#39;create table sl_registry (
--- 10723,10727 ----
  	-- Changes for 1.2
  	-- ----
! 	if p_old IN (&#39;1.0.2&#39;, &#39;1.0.5&#39;, &#39;1.0.6&#39;, &#39;1.1.0&#39;, &#39;1.1.1&#39;, &#39;1.1.2&#39;, &#39;1.1.3&#39;,&#39;1.1.5&#39;, &#39;1.1.6&#39;, &#39;1.1.7&#39;, &#39;1.1.8&#39;, &#39;1.1.9&#39;) then
  		-- Add new table sl_registry
  		execute &#39;create table sl_registry (
***************
*** 10592,10601 ****
                  execute &#39;alter table sl_event set without oids;&#39;;
                  execute &#39;alter table sl_listen set without oids;&#39;;
-                 execute &#39;alter table sl_log_1 set without oids;&#39;;
-                 execute &#39;alter table sl_log_2 set without oids;&#39;;
                  execute &#39;alter table sl_node set without oids;&#39;;
                  execute &#39;alter table sl_nodelock set without oids;&#39;;
                  execute &#39;alter table sl_path set without oids;&#39;;
-                 execute &#39;alter table sl_seqlog set without oids;&#39;;
                  execute &#39;alter table sl_sequence set without oids;&#39;;
                  execute &#39;alter table sl_set set without oids;&#39;;
--- 10735,10741 ----
***************
*** 10606,10609 ****
--- 10746,10764 ----
  	end if;
  
+ 	-- ----
+ 	-- Changes for 1.2.11
+ 	-- ----
+ 	if p_old IN (&#39;1.0.2&#39;, &#39;1.0.5&#39;, &#39;1.0.6&#39;, &#39;1.1.0&#39;, &#39;1.1.1&#39;, &#39;1.1.2&#39;, &#39;1.1.3&#39;,&#39;1.1.5&#39;, &#39;1.1.6&#39;, &#39;1.1.7&#39;, &#39;1.1.8&#39;, &#39;1.1.9&#39;, &#39;1.2.0&#39;, &#39;1.2.1&#39;, &#39;1.2.2&#39;, &#39;1.2.3&#39;, &#39;1.2.4&#39;, &#39;1.2.5&#39;, &#39;1.2.6&#39;, &#39;1.2.7&#39;, &#39;1.2.8&#39;, &#39;1.2.9&#39;, &#39;1.2.10&#39;) then
+ 		-- Add new table sl_archive_counter
+ 		execute &#39;create table sl_archive_counter (
+ 						ac_num			bigint,
+ 						ac_timestamp	timestamp
+ 					) without oids&#39;;
+ 		execute &#39;insert into sl_archive_counter
+ 					(ac_num, ac_timestamp) values (0, &#39;&#39;epoch&#39;&#39;::timestamp)&#39;;
+ 	end if;
+ 
+ 	-- In any version, make sure that the xxidin() functions are defined STRICT
+ 	perform make_function_strict (&#39;xxidin&#39;, &#39;(cstring)&#39;);
  	return p_old;
  end;



More information about the Slony1-commit mailing list