v.24.1Improvement
Allow KILL QUERY to Cancel Backups/Restores and New Shutdown Setting in ClickHouse
AllowKILL QUERYto cancel backups / restores. This PR also makes running backups and restores visible insystem.processes. Also, there is a new setting in the server configuration now -shutdown_wait_backups_and_restores(default=true) which makes the server either wait on shutdown for all running backups and restores to finish or just cancel them. #58804 (Vitaly Baranov).
Why it matters
This feature provides users with the ability to cancel running backup and restore operations using theKILL QUERY command, improving control over long-running maintenance tasks. It also enhances monitoring by making backups and restores visible in the system.processes table. Additionally, the new shutdown_wait_backups_and_restores setting allows the server to either wait for these operations to finish on shutdown or cancel them immediately, thereby improving operational flexibility and graceful shutdown handling.How to use it
Users can cancel ongoing backups or restores by executing theKILL QUERY command with the corresponding query ID visible in system.processes. To configure shutdown behavior, set the shutdown_wait_backups_and_restores setting in the server configuration file (default is true, which waits for backup and restore operations to complete before shutting down).