mirror of
https://github.com/holos-run/holos.git
synced 2026-03-20 01:04:59 +00:00
Problem: The standby cluster on k2 fails to start. A pgbackrest pod first restores the database from S3, then the pgha nodes try to replay the WAL as part of the standby initialization process. This fails because the PGDATA directory is not empty. Solution: Specify the spec.dataSource field only when the cluster is configured as a primary cluster. Result: Non-primary clusters are standby, they skip the pgbackrest job to restore from S3 and move straight to patroni replaying the WAL from S3 as part of the pgha pods. One of the two pgha pods becomes the "standby leader" and restores the WAL from S3. The other is a cascading standby and then restores the same WAL from the standby leader. After 8 minutes both pods are ready. ``` ❯ k get pods NAME READY STATUS RESTARTS AGE zitadel-pgbouncer-d9f8cffc-j469g 2/2 Running 0 11m zitadel-pgbouncer-d9f8cffc-xq29g 2/2 Running 0 11m zitadel-pgha1-27w7-0 4/4 Running 0 11m zitadel-pgha1-c5qj-0 4/4 Running 0 11m zitadel-repo-host-0 2/2 Running 0 11m ```
2 lines
2 B
Plaintext
2 lines
2 B
Plaintext
0
|