Chris Browne cbbrowne at lists.slony.info
Tue Jun 9 14:38:29 PDT 2009
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv4394/doc/adminguide

Modified Files:
      Tag: REL_2_0_STABLE
	adminscripts.sgml 
Log Message:
Add in a slonik configuration dump tool, that will be helpful when doing
upgrades from 1.2 to 2.0, along with documentation.


Index: adminscripts.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/adminscripts.sgml,v
retrieving revision 1.52.2.1
retrieving revision 1.52.2.2
diff -C2 -d -r1.52.2.1 -r1.52.2.2
*** adminscripts.sgml	15 Dec 2008 23:30:58 -0000	1.52.2.1
--- adminscripts.sgml	9 Jun 2009 21:38:27 -0000	1.52.2.2
***************
*** 759,762 ****
--- 759,812 ----
  
  </sect2>
+ <sect2 id="slonikconfdump"> <title>slonikconfdump.sh</title>
+ 
+ <indexterm><primary>slonik configuration dump</primary></indexterm>
+ 
+ <para> The tool <filename>tools/slonikconfdump.sh</filename> was
+ created to help dump out a &lslonik; script to duplicate the
+ configuration of a functioning &slony1; cluster.</para>
+ 
+ <para> It dumps out: </para>
+ 
+ <itemizedlist>
+ <listitem><para>Cluster name </para> </listitem>
+ <listitem><para>Node connection information </para> <para> Note that it uses the first value it finds (<emphasis>e.g.</emphasis> - for the lowest numbered client node). </para> </listitem>
+ <listitem><para> Nodes </para> </listitem>
+ <listitem><para> Sets </para> </listitem>
+ <listitem><para> Tables </para> </listitem>
+ <listitem><para> Sequences </para> </listitem>
+ <listitem><para> Subscriptions </para> </listitem>
+ </itemizedlist>
+ 
+ <para> It may be run as follows: </para>
+ <programlisting>
+ chris at dba2:Slony-I/CMD/slony1-2.0/tools> SLONYCLUSTER=slony_regress1 PGDATABASE=slonyregress1 bash slonikconfdump.sh
+ # building slonik config files for cluster slony_regress1
+ # generated by: slonikconfdump.sh
+ # Generated on:  Tue Jun 9 17:34:12 EDT 2009
+ cluster name=slony_regress1;
+ include <admin-conninfos.slonik>;  # Draw in ADMIN CONNINFO lines
+ node 1 admin conninfo='dbname=slonyregress1 host=localhost user=chris port=7083';
+ node 2 admin conninfo='dbname=slonyregress2 host=localhost user=chris port=7083';
+ init cluster (id=1, comment='Regress test node');
+ store node (id=2, comment='node 2');
+ store path (server=1, client=2, conninfo='dbname=slonyregress1 host=localhost user=chris port=7083', connretry=10);
+ store path (server=2, client=1, conninfo='dbname=slonyregress2 host=localhost user=chris port=7083', connretry=10);
+ create set (id=1, origin=1, comment='All test1 tables');
+ set add table (id=1, set id=1, origin=1, fully qualified name='"public"."table1"', comment='accounts table, key='table1_pkey');
+ set add table (id=2, set id=1, origin=1, fully qualified name='"public"."table2"', comment='public.table2, key='table2_id_key');
+ set add table (id=4, set id=1, origin=1, fully qualified name='"public"."table4"', comment='a table of many types, key='table4_pkey');
+ set add table (id=5, set id=1, origin=1, fully qualified name='"public"."table5"', comment='a table with composite PK strewn across the table, key='table5_pkey');
+ subscribe set (id=1, provider=1, receiver=2, forward=YES);
+ chris at dba2:Slony-I/CMD/slony1-2.0/tools>
+ </programlisting>
+ 
+ <para> The output should be reviewed before it is applied elsewhere;
+ particular attention should be paid to the <command>ADMIN
+ CONNINFO</command> statements, as it picks the first value that it
+ sees for each node; in a complex environment, it may not pull out the
+ right value.</para>
+ 
+ </sect2>
  </sect1>
  <!-- Keep this comment at the end of the file



More information about the Slony1-commit mailing list