database_replicas 시스템 테이블
database_replicas 시스템 테이블
database_replicas 시스템 테이블은 각 Replicated 데이터베이스 복제본에 대한 정보를 담고 있어요.
출처: 문서
본문
Description (설명)
각 Replicated 데이터베이스 복제본에 대한 정보를 담고 있어요.
Columns (열)
database(String) — Replicated 데이터베이스가 속한 이름.is_readonly(UInt8) — 데이터베이스 복제본이 읽기 전용 모드인지 여부.max_log_ptr(Int32) — 일반 활동 로그의 최대 항목 번호.replica_name(String) — ClickHouse Keeper의 복제본 이름.replica_path(String) — ClickHouse Keeper의 복제본 데이터 경로.zookeeper_path(String) — ClickHouse Keeper의 데이터베이스 데이터 경로.shard_name(String) — 클러스터의 샤드 이름.log_ptr(Int32) — 복제본이 실행 큐에 복사한 일반 활동 로그의 최대 항목 번호에 1을 더한 값.total_replicas(UInt32) — 이 데이터베이스의 알려진 총 복제본 수.zookeeper_exception(String) — ClickHouse Keeper에서 정보를 가져올 때 오류가 발생했다면 마지막 예외 메시지.is_session_expired(UInt8) — ClickHouse Keeper와의 세션이 만료됨. 기본적으로is_readonly와 같음.
Example (예제)
SELECT * FROM system.database_replicas FORMAT Vertical;
Row 1:
──────
database: db_2
is_readonly: 0
max_log_ptr: 2
replica_name: replica1
replica_path: /test/db_2/replicas/shard1|replica1
zookeeper_path: /test/db_2
shard_name: shard1
log_ptr: 2
total_replicas: 1
zookeeper_exception:
is_session_expired: 0