Running deploy_pgcluster twice #665
Unanswered
ahussainrc
asked this question in
Q&A
Replies: 1 comment
-
@ahussainrc Why did you launch the deployment on top of an already deployed cluster? The playbook is protected from such a launch by checking for the presence of a data directory and if postgres is already there, then the playbook should have stopped with an error: " Recreate the problematic replica |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I understand deploy_pgcluster suppose to be performed once to setup the cluster and for config changes of postgres/patroni/system, config_pgcluster needs to be used.
I want to understand why performing deploy_pgcluster twice breaks the cluster, do we have to be very careful not to run deploy_pgcluster twice ?
Here is what I have performed:
perform deploy_pgcluster.
Two postgres nodes (pgnode01, pgnode02) and three etcd nodes (etcd01, etcd02, etcd03) configured successfully. postgres cluster is up and running and accessible on VIP. pgnode01 is master and pgnode02 is replica.
Shutdown pgnode01 to test failover.
automatic failover did happen. pgnode02 became master and pgnode01 became replica. Database connection on VIP was not broken.
Run deploy_pgcluster again.
Without doing any change in any of the configurations, I perform deploy_pgcluster again but it failed and postgres on pgnode01 became down. Cluster is still accessible because pgnode02 became the master.
Console logs
Patroni logs:
Postgres logs:
Beta Was this translation helpful? Give feedback.
All reactions