Schedule Around Maintenance Windows
If a scheduled maintenance occurs while a query is running, the query is terminated and rolled back and you will need to restart it. Schedule long-running operations, such as large data loads or VACUUM operation, to avoid maintenance windows. You can also minimize the risk, and make restarts easier when they are needed, by performing data loads in smaller increments and managing the size of your VACUUM operations. For more information, see Load Data in Sequential Blocks and Vacuuming Tables.