Don't reset slots annotation if postgres isn't ready (#2306)

The current state of permanent logical replication slots on the primary is queried together with `pg_current_wal_lsn()` and hence they "fail" simultaneously if Postgres isn't yet ready for accepting connections and in this case we want to avoid updating the `/status` key altogether.

On K8s we don't use a dedicated object for the `/status` key, but use the same object (Endpoint or ConfigMap) as for the leader. If the `last_lsn` isn't set we avoid patching the corresponding annotation, but, the `slots` annotation was reset due to the oversight.
This commit is contained in:
Alexander Kukushkin
2022-05-19 15:06:59 +02:00
committed by GitHub
parent 496d14e6ca
commit ef3401c17f