Resyncing integrations with Amazon S3 Tables
This is preview documentation for the Aurora PostgreSQL integration with Amazon S3
Tables. Before using this capability, review the Betas and Previews terms in
the AWS Service
Terms
In an Aurora PostgreSQL integration with Amazon S3 Tables, a resync reloads a table's data from the source when ongoing replication cannot continue correctly. During the resync, the existing data in the target remains available to query but is not updated. When the resync completes, replication resumes.
A full resync reloads every table that the integration includes. A partial resync reloads
only the tables that you name with the --tables option of the
resync-integration command.
Automatic resync
When a recoverable error stops a table from replicating, or a data definition language (DDL) change requires a resync, the integration resyncs the table automatically. No action is required. For the DDL changes that require a resync, see Changes that cause a resync.
During an automatic resync, the table moves through the following states:
-
The table enters
RESYNC_REQUIREDwhen the integration detects that it needs a resync. -
The table changes to
RESYNC_INITIATEDwhen the reload from the source starts. -
The table changes to
RESYNC_REPLAYINGwhile the integration applies source changes that were made during the reload to the target table. -
The table returns to
SYNCEDwhen the resync completes.
For a description of each state, see Table states.
If automatic resyncs fail three times, the table enters the FAILED state
with the reason RESYNC_PERMANENTLY_REJECTED. For more information, see
A table is not being replicated.
The integration starts an automatic resync for the following common reasons:
-
A DDL change that requires a resync. For the list, see Changes that cause a resync.
-
An increase in the scope of the data rules.
-
A table rename that makes the table match your data rules.
-
A column rename that makes a data rule stop excluding the column.
-
Recovery from an internal error.
If the integration detects that a table's target might no longer match the source, it resyncs the table. For example, this can happen after a failed write to the target or an error in the change stream.
Resyncing tables manually
You can resync tables manually with the console, the AWS CLI, or the Amazon RDS API. The console always resyncs every table in the integration. To resync only selected tables, use the AWS CLI or the Amazon RDS API.
You can start a resync when the integration's status is active or
needs_attention. You cannot resync an integration when its status is
syncing, creating, modifying,
deleting, or failed.
While a resync is running, a new resync request is refused until the running resync
completes. Wait for the status to return to active, and then start the next
resync.
A resync pauses replication for the affected tables and reloads their data from the
source. The existing data in the target tables remains available to query during the
resync. The time to complete the resync depends on the size of the tables. While the
resync runs, the integration's status is syncing.
To resync an integration in the console
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
. -
In the navigation pane, choose Integrations, and then choose your integration.
-
Choose Resync.
-
In the Resync integration dialog, enter
confirm, and then choose Resync.
To resync with the AWS CLI, use the resync-integration command. Use one of
the following options:
-
--tables: Resyncs specific tables. Pass each table asdatabase.schema.table. Each entry can also bedatabase.schema.*ordatabase.*.*. Pass 1 to 100 entries. The integration's data rules must include each one. On Linux, macOS, or Unix, put an entry that contains*in single quotes, for example--tables '.sales.public.*' -
--full-resync: Resyncs every table in the integration.
You cannot use --full-resync and --tables in the same
command.
The following example resyncs two tables:
Example
For Linux, macOS, or Unix:
aws rds resync-integration \ --integration-identifier arn:aws:rds:us-east-1:111122223333:integration:5b9f3d2e-1111-2222-3333-444455556666\ --tablessales.public.orderssales.public.customers
For Windows:
aws rds resync-integration ^ --integration-identifier arn:aws:rds:us-east-1:111122223333:integration:5b9f3d2e-1111-2222-3333-444455556666^ --tablessales.public.orderssales.public.customers
The following example resyncs the whole integration:
Example
For Linux, macOS, or Unix:
aws rds resync-integration \ --integration-identifier arn:aws:rds:us-east-1:111122223333:integration:5b9f3d2e-1111-2222-3333-444455556666\ --full-resync
For Windows:
aws rds resync-integration ^ --integration-identifier arn:aws:rds:us-east-1:111122223333:integration:5b9f3d2e-1111-2222-3333-444455556666^ --full-resync
After you start a resync, the integration status changes to syncing, and
Aurora sends RDS-EVENT-0585 (resync started). When the resync completes, Aurora sends
RDS-EVENT-0586 (resync completed), the integration status returns to active,
and the integration resumes replication. A resync that you start while the integration is
in needs_attention also returns it to active. To follow each
table, check its state in the per-table status. For more information, see Per-table status and Events.