Skip to content
SHC Docs

Underneath the members group

Read this right after Postgres members across locations. Every command here reads; none changes the cluster.

home01’s daemon started again when the first node joined, so it took the leadership again, and for a few minutes after a leader changes shc status opens with a line saying automatic moves are frozen. SHC waits for calm before it moves anything by itself. Run the command again until that line is gone.

home01
$ shc status -s members
last polled 2026-10-09 21:47:05 UTC
NODE STATE CPU% MEM% DISK% LOAD
far01 healthy 21.6 10.3 6.2 0.45
home01 healthy 54.8 26.6 14.0 3.48
home02 healthy 16.1 10.6 6.3 1.12
all 165 queues green on 3 nodes
TENANT STACK ENVIRONMENT STATE SERVICES NODES LABELS NO HEALTHCHECK
prod members prod healthy 6/6 far01, home01, home02 app=postgres environment=prod stack=members tenant=prod 3
TENANT STACK ENVIRONMENT REPLICA NODE STATE LABELS
prod members prod postgres-1-r0 home02 ready role=primary
prod members prod postgres-2-r0 home01 ready role=replica
prod members prod postgres-3-r0 far01 ready role=replica
Groups
GROUP MEMBER LOCATION READY ALIAS SERVICES
postgres 1 learn/home ready postgres etcd-1, postgres-1
postgres 2 learn/home ready etcd-2, postgres-2
postgres 3 learn/far ready etcd-3, postgres-3
Aliases
TENANT STACK ENVIRONMENT ALIAS SELECTS REPLICAS
prod members prod postgres role=primary:1 postgres-1-r0
prod members prod postgres-ro role=replica postgres-2-r0,postgres-3-r0
runs on far01, home01, home02
3 nodes, 1 deployment

Each member is two services on one node, postgres-N and etcd-N, and the member’s location is the one --scale gave it. The Groups section lists the three members and names the one the alias postgres points at, the writer.

With more than one member, every member runs Patroni. Patroni keeps one writer, the leader, and the others stream from it. The members agree on the leader through etcd, and the three etcd-N services form one etcd cluster:

home01
$ shc exec -s members -S etcd-1 -- etcdctl member list
75c7807f4d233a07, started, etcd-3, http://etcd-3:2380, http://etcd-3:2379, false
9c4a67d72de15f89, started, etcd-1, http://etcd-1:2380, http://etcd-1:2379, false
fa85386c7afdcbf3, started, etcd-2, http://etcd-2:2380, http://etcd-2:2379, false

Patroni keeps the leader’s name under one key in etcd:

home01
$ shc exec -s members -S etcd-1 -- etcdctl get /shc/pg/leader
/shc/pg/leader
postgres-1

That is the member labelled role=primary above, and the one the alias postgres goes to. postgres-ro spreads over the two labelled role=replica.

Next: A node failing.