Mon Jul 9 08:19:51 PDT 2007
- Previous message: [Slony1-commit] slony1-engine TODO
- Next message: [Slony1-commit] slony1-engine/doc/adminguide slonik_ref.sgml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide In directory main.slony.info:/tmp/cvs-serv26870 Modified Files: slonyupgrade.sgml Log Message: Add to upgrade-to-2.0 docs another approach to handling tables with columns defined via TABLE ADD KEY. Index: slonyupgrade.sgml =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/slonyupgrade.sgml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** slonyupgrade.sgml 18 Apr 2007 15:03:51 -0000 1.6 --- slonyupgrade.sgml 9 Jul 2007 15:19:49 -0000 1.7 *************** *** 113,121 **** command <xref linkend="stmtsetdroptable">. </para> ! <para> This does <emphasis>not</emphasis> drop out the &slony1;-generated column. </para> ! </listitem> ! <listitem><para> On each node, run an SQL script to alter the table, dropping the extra column.</para> ! <para> <command> alter table whatever drop column "_Slony-I_cluster-rowID";</command> </para> <para> This needs to be run individually against each node. Depending --- 113,123 ---- command <xref linkend="stmtsetdroptable">. </para> ! <para> This does <emphasis>not</emphasis> drop out the ! &slony1;-generated column. </para> </listitem> ! ! <listitem><para> On each node, run an SQL script to alter the table, ! dropping the extra column.</para> <para> <command> alter table ! whatever drop column "_Slony-I_cluster-rowID";</command> </para> <para> This needs to be run individually against each node. Depending *************** *** 190,193 **** --- 192,240 ---- </itemizedlist> + + <para> This approach should be fine for tables that are relatively + small, or infrequently used. If, on the other hand, the table is + large and heavily used, another approach may prove necessary, namely + to create your own sequence, and <quote>promote</quote> the formerly + &slony1;-generated column into a <quote>real</quote> column in your + database schema. An outline of the steps is as follows: </para> + + <itemizedlist> + + <listitem><para> Add a sequence that assigns values to the + column. </para> + + <para> Setup steps will include SQL <command>CREATE + SEQUENCE</command>, SQL <command>SELECT SETVAL()</command> (to set the + value of the sequence high enough to reflect values used in the + table), Slonik <xref linkend="stmtcreateset"> (to create a set to + assign the sequence to), Slonik <xref linkend="stmtsetaddsequence"> + (to assign the sequence to the set), Slonik <xref + linkend="stmtsubscribeset"> (to set up subscriptions to the new + set)</para> + </listitem> + + <listitem><para> Attach the sequence to the column on the + table. </para> + + <para> This involves <command>ALTER TABLE ALTER COLUMN</command>, + which must be submitted via the Slonik command <xref + linkend="stmtddlscript">. </para> + </listitem> + + <listitem><para> Rename the column + <envar>_Slony-I_ at CLUSTERNAME@_rowID</envar> so that &slony1; won't + consider it to be under its control.</para> + + <para> This involves <command>ALTER TABLE ALTER COLUMN</command>, + which must be submitted via the Slonik command <xref + linkend="stmtddlscript">. </para> + + <para> Note that these two alterations might be accomplished via the + same <xref linkend="stmtddlscript"> request. </para> + </listitem> + + </itemizedlist> + </sect2> </sect1>
- Previous message: [Slony1-commit] slony1-engine TODO
- Next message: [Slony1-commit] slony1-engine/doc/adminguide slonik_ref.sgml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list