con un clic
replication-guide
// ReplicatedMergeTree operations, failover procedures, lag diagnosis, quorum writes, and Keeper management.
// ReplicatedMergeTree operations, failover procedures, lag diagnosis, quorum writes, and Keeper management.
Exact column names for the system tables the agent queries most (processes, query_log, parts, merges, mutations, replicas, replication_queue, disks, settings, zookeeper, users/grants, metrics) plus rules for choosing dedicated tools over raw SQL. Load before hand-writing SQL against system tables.
Cluster management: distributed tables, ON CLUSTER DDL, node lifecycle, resharding, load balancing, and Keeper migration.
Schema migrations: ALTER patterns, engine changes, zero-downtime swaps, clickhouse-local offline migrations, and lightweight UPDATE/DELETE strategies.
RBAC configuration, row policies, quotas, network security, audit logging, and access control best practices.
Compression codecs, TTL policies, tiered storage, part management, and disk space optimization.
Production operational practices: insert batching, async writes, query cache, connection pooling, and recommended settings.
| name | replication-guide |
| description | ReplicatedMergeTree operations, failover procedures, lag diagnosis, quorum writes, and Keeper management. |
ReplicatedMergeTree('/clickhouse/tables/{shard}/{database}/{table}', '{replica}')system.replicas — per-table status: absolute_delay, queue_size, is_leader, is_readonlysystem.replication_queue — pending operations: fetches, merges, mutationsabsolute_delay = 0 — fully caught upis_readonly = 0 — accepting writesqueue_size < 10 — healthy queueactive_replicas = total_replicas — all replicas onlineSELECT * FROM system.replicas WHERE is_readonly = 1SELECT * FROM system.zookeeper WHERE path = '/'SYSTEM DROP REPLICA 'replica_name' FROM TABLE db.tableSYSTEM RESTORE REPLICA db.tableSET insert_quorum = 2 — wait for N replicas to confirmSET insert_quorum_parallel = 1 — parallel quorum inserts (v21.8+)SET insert_quorum_timeout = 60000 — timeout in mssystem.zookeeper table for browsing ZK tree/clickhouse/tables/ for table metadataSELECT * FROM system.asynchronous_metrics WHERE metric LIKE '%Keeper%'SYSTEM SYNC REPLICA db.table to force synctroubleshooting skill for OOM-related replica failures and disk-full scenarios.