User guide

the amount of data and the number of nodes in the smaller cluster. It can take anywhere from a couple
of hours to a couple of days.
When you start the resize operation, Amazon Redshift puts the existing cluster into read-only mode until
the resize finishes. During this time, you can only run queries that read from the database; you cannot
run any queries that write to the database, including read-write queries. For more information, see Write
and read-write operations in the Amazon Redshift Database Developer Guide.
Note
If you would like to resize with minimal production impact, you can use the following section,
Snapshot, Restore, and Resize Operation Overview (p. 225), to create a copy of your cluster,
resize the copy, and then switch the connection endpoint to the resized cluster when the resize
is complete.
After Amazon Redshift puts the source cluster into read-only mode, it provisions a new cluster, the target
cluster, using the information that you specify for the node type, cluster type, and number of nodes.Then,
Amazon Redshift copies the data from the source cluster to the target cluster. When this is complete, all
connections switch to use the target cluster. If you have any queries in progress at the time this switch
happens, your connection will be lost and you must restart the query on the target cluster.You can view
the resize progress on the cluster's Status tab on the Amazon Redshift console.
Amazon Redshift does not sort tables during a resize operation, so the existing sort order is maintained.
When you resize a cluster, Amazon Redshift distributes the database tables to the new nodes based on
their distribution styles and runs an ANALYZE command to update statistics. Rows that are marked for
deletion are not transferred, so you will only need to run a VACUUM command if your tables need to be
resorted. For more information, see Vacuuming tables in the Amazon Redshift Database Developer
Guide.
To walk through the process of resizing an Amazon Redshift cluster using the resize operation, see
Tutorial: Using the Resize Operation to Resize a Cluster (p. 226).
Snapshot, Restore, and Resize Operation
Overview
As described in the preceding section, the time it takes to resize a cluster with the resize operation depends
heavily on the amount of data in the cluster. Because you cannot perform write or read-write operations
in the database during the resize, you should determine whether you want to use the resize operation or
an alternate method that reduces the amount of time that the cluster is in read-only mode.
If you require near-constant write access to your Amazon Redshift cluster, you can use the snapshot and
restore operations described in the following section.This approach requires that any data that is written
to the source cluster after the snapshot is taken must be copied manually to the target cluster after the
switch. Depending on how long the copy takes, you might need to repeat this several times until you have
the same data in both clusters and can make the switch to the target cluster. This process might have a
negative impact on existing queries until the full set of data is available in the target cluster, but it does
minimize the amount of time that you cannot write to the database.
The snapshot, restore, and resize approach uses the following process:
1. Take a snapshot of your existing cluster. The existing cluster is the source cluster.
2. Make note of the time the snapshot was taken so that you can later identify the point at which you’ll
need to rerun extract, transact, load (ETL) processes to load any post-snapshot data into the target
database.
3. Restore the snapshot into a new cluster. This new cluster is the target cluster. Verify that the sample
data exists in the target cluster.
API Version 2012-12-01
225
Amazon Redshift Management Guide
Snapshot, Restore, and Resize Operation Overview