v.23.5Improvement

Added new columns for Replicated database replicas in system.clusters and enhanced SYSTEM DROP DATABASE REPLICA query

Added new columns with info about Replicated database replicas to system.clusters: database_shard_name, database_replica_name, is_active. Added an optional FROM SHARD clause to SYSTEM DROP DATABASE REPLICA query. #48548 (Alexander Tokmakov).
Added new columns to the system.clusters table providing detailed information about Replicated database replicas, including database_shard_name, database_replica_name, and is_active. Introduced an optional FROM SHARD clause to the SYSTEM DROP DATABASE REPLICA command.

Why it matters

This feature improves observability and management of Replicated databases by exposing shard and replica details directly in system.clusters. The new FROM SHARD clause enhances control over dropping replicas by allowing operations to target a specific shard, making replica management more precise and safer in distributed environments.

How to use it

Users can query the updated system.clusters table to get detailed shard and replica info including database_shard_name, database_replica_name, and the is_active status. To drop a database replica from a specific shard, use the enhanced command:

SYSTEM DROP DATABASE REPLICA <replica> ON <cluster> FROM SHARD <shard_name>