citus
citus copied to clipboard
Harden database commands against failures
Today, for database commands that cannot be executed in a transaction block (**), we don't do much next time when the command is invoked, if the prior invocation failed in the midway, e.g., if CREATE DATABASE succeeded on some nodes but not on all. We should do something better than this. For example, @thanodnl shared this as an idea on how we could handle failure scenarios for CREATE DATABASE better:
eg, could we use a trick where we create the database with a temporary name on all nodes and then transactionally rename the database we could track the temporary names in a local catalog table for cleanup later if required etc.
- CREATE DATABASE ✅ https://github.com/citusdata/citus/pull/7483
- DROP DATABASE
- ALTER DATABASE SET TABLESPACE