Citus didn't come with some necessary function by default. I wrote some function to help maintenance jobs easier.
get_inactive_shard()
: Query to show shard that become inactive.repair_shard()
: Query to repair ALL shard by replace the healthy shard to inactive shard.repair_single_shard(shard_id)
: Query to repair single shard (expect shard_id as a parameter).