Over time, member tables
can age out and need to be removed to make room to accommodate the
addition of more current member tables. Or a member table might need
to be replaced by an updated version of itself. The process of replacing
or updating one or more member tables is referred to as “refreshing”
the cluster table.
The server supports
several ways to refresh a cluster table:
-
You can replace an existing member
table with a new member table in place with the CLUSTER REPLACE statement.
CLUSTER REPLACE inserts the new member table into the slot vacated
by the old member table. You can replace one member table at a time.
CLUSTER REPLACE is not supported on cluster tables that are created
with UNIQUEINDEX=YES.
-
You can remove one or more tables
from the cluster’s member list with the CLUSTER REMOVE statement.
CLUSTER REMOVE removes the member tables and closes their slot in
the member list. You can remove multiple member tables at one time
with CLUSTER REMOVE.
-
You can append new tables to the
end of the member list with the CLUSTER ADD statement.
-
You can undo the cluster with the
CLUSTER UNDO statement. Then, after making necessary changes to the
individual member tables, you can later re-create the cluster with
the CLUSTER CREATE statement. When you are making these changes, you
must take the cluster offline.
When a member table
is removed from a cluster with the CLUSTER REPLACE or CLUSTER REMOVE
statement, or a new member is added to the cluster with the CLUSTER
ADD statement, users that currently have the cluster table open for
reading will remain connected to the table. However, they will not
see the changes until the next time they open the cluster table.
Member tables that are removed from a cluster table remain in the
domain as regular server tables, although the tables are in a read-only state. If you have
a need to update a table that was removed from a cluster, you can use the CLUSTER
FIX statement to restore the table to a writable state.
For more information,
see Restoring Removed or Replaced Cluster Table Members.