What happens to Amazon RDS and Amazon Redshift queries that are running during a maintenance window?

2 minute read

I have Amazon Relational Database Service (Amazon RDS) or Amazon Redshift queries that are running during a maintenance window.


Note: For both Amazon RDS and Amazon Redshift, it's a best practice to perform maintenance during low or no business activity. Depending on what maintenance is performed, maintenance can exceed the maintenance window time.

Amazon RDS maintenance

Amazon RDS maintenance windows usually involve updates to one or more of the following parts:

  • To the DB instance's operating system (OS)
  • To the database engine version
  • To the cluster version
  • To the underlying hardware

If maintenance requires an instance reboot or an engine restart, then queries and transactions that are running are terminated. To make sure that Atomicity, Consistency, Isolation, and Durability (ACID) compliance, uncommitted transactions are rolled back during the engine restart. You must re-run the queries or transactions that are terminated. By default, both MySQL and PostgreSQL are ACID compliant, but it can be overridden by parameter configurations. To confirm that there are no parameters that might stop the engine from being ACID compliant, check your engine's documentation. To check your engine's documentation, see InnoDB and the ACID Model on the MySQL website and synchronous_commit on the PostgreSQL website. For more information, see the MySQL documentation for InnoDB and the ACID Model and the PostgreSQL documentation for synchronous_commit.

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?

AWS OFFICIALUpdated 9 months ago