I have Amazon Relational Database Service (Amazon RDS) or Amazon Redshift queries that are running during a maintenance window.
Resolution
Note: For both Amazon RDS and Amazon Redshift, it's a best practice to perform maintenance during low or no business activity. Depending on the maintenance that's performed, it's possible that the maintenance duration can exceed the maintenance window time.
Amazon RDS maintenance
Amazon RDS maintenance windows usually involve updates to one or more of the following parts:
- The DB instance's operating system (OS)
- The database engine version
- The cluster version
- The underlying hardware
If maintenance requires an instance reboot or an engine restart, then queries and transactions that are running are terminated. To maintain Atomicity, Consistency, Isolation, and Durability (ACID) compliance, uncommitted transactions are rolled back during the engine restart. You must run the queries or transactions that are terminated again. By default, both MySQL and PostgreSQL are ACID compliant, but you can configure parameters to override that compliance behavior.
To confirm that there aren't any parameters that might stop the engine from being ACID compliant, check your engine's documentation. For more information, see the documentation for InnoDB and the ACID Model on the MySQL website, and the documentation for synchronous_commit on the PostgreSQL website.
Amazon Redshift maintenance
Amazon Redshift maintenance windows require the cluster to go offline or to restart during scheduled maintenance. If queries are running during scheduled maintenance, then queries are terminated and rolled back. To view terminated queries, see SVL_QLOG.
It's a best practice to schedule around maintenance windows, especially long-running operations, such as large data loads or VACUUM operations. For more information, see Amazon Redshift best practices.
Note: If the maintenance doesn't require a restart for the DB engine, cluster, or instance, then queries aren't affected.
Related information
Maintaining a DB instance
How do I configure notifications for Amazon RDS or Amazon Redshift maintenance windows?
How do I minimize downtime during required Amazon RDS maintenance?