<!--  -->
<sect1 id="reshape"> <title>Reshaping a Cluster</title>

<indexterm><primary>reshaping replication</primary></indexterm>

<para>If you rearrange the nodes so that they serve different
purposes, this will likely lead to the subscribers changing a bit.</para>

<para>This will require doing several things:
<itemizedlist>

<listitem><para> If you want a node that is a subscriber to become the
origin for a particular replication set, you will have to issue a
suitable <xref linkend="stmtmoveset"> <command>MOVE SET</command>
operation.</para></listitem>

<listitem><para> You may subsequently, or instead, wish to modify the
subscriptions of other nodes.  You might want to modify a node to get
its data from a different provider, or to change it to turn forwarding
on or off.  This can be accomplished by issuing the slonik <xref
linkend="stmtsubscribeset"> operation with the new subscription
information for the node; &slony1; will change the configuration.  No
need to ask for <xref linkend="stmtunsubscribeset">; no need for it to
start copying data from scratch; the <xref linkend="stmtsubscribeset">
request will reshape the subscription <quote>on the fly</quote> and
allow data to remain consistent between nodes.  </para></listitem>


<listitem><para> After performing the configuration change, you
should, as <xref linkend="bestpractices">, run the &lteststate;
scripts in order to validate that the cluster state remains in good
order after this change. </para> </listitem>

</itemizedlist>
</para>
<para> The <filename>altperl</filename> toolset includes a
<application>regenerate-listens</application> script that is up to
the task of creating the new <xref linkend="stmtstorelisten">
commands; it isn't, however, smart enough to know what listener paths
should be dropped.
</para>

</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:"slony.sgml"
sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/lib/sgml/catalog")
sgml-local-ecat-files:nil
End:
-->
