Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Check PostgresDB

Purpose

Confirm the health of the PostgresDB database by listing the states of the leaders and replicas. You must have, at a minimum, one leader in running state and two replicas in streaming state for PostgresDB to be considered healthy. If any replica is in a non-streaming state (such as stopped, starting, and so on), you can reinitalize the replica.

Action

Log in to an atom-db pod using the kubectl exec -it -n common atom-db-0 -- bash command. List the cluster name, and all the replicas and leaders using the patronictl list command.

If any replica is not in streaming state, reinitialize the replica using the patronictl reinit atom-db atom-db-2 command.

Sample Output

Where, atom-db is the cluster name, and atom-db-2 is the replica that you want to reinitialize.

Meaning

You must have at least one leader in the running state and two replicas in the streaming state for PostgresDB to be considered healthy.