conjurdemos / kubernetes

Conjur providing machine identity and secrets in Kubernetes [DEPRECATED]
7 stars 0 forks source link

Check replication log position of each standby when promoting #4

Closed kgilpin closed 7 years ago

kgilpin commented 7 years ago

There is assumption that the "sync" and "async" standby can be assigned by the client script, which isn't correct. Postgres chooses the sync standby automatically. So, when failing over, the procedure should be to fetch the /health of each standby, compare the replication log position, and choose the one that's more advanced. There may also be a tie, in which case either can be used.

jodyhuntatx commented 7 years ago

assumptions dropped. pods are still labeled but only as: unset, master, standby & (during failover) candidate. candidate is selected per max repl log bytes.