Create k8s Service pointing to synchronous replicas
- Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.8.2
- Where do you run it - cloud or metal? Kubernetes or OpenShift? Bare Metal K8s
- Are you running Postgres Operator in production? yes
- Type of issue? feature request
Hi team! The operator is creating foo-test-cluster-repl Service pointing to all replicas. When one wants to use synchronous replication, could the operator create the Service pointing only to synchronous replicas? E.g. foo-test-cluster-sync-repl pointing to replicas with Sync Standby role (patroni notation), foo-test-cluster-repl pointing to all replicas (it seems to me it's a valid case when total_replicas > sync_replicas).
We have also seen cases where data needs to be read from synchronous replica / synchronous replicas. Reading from asynchronous replica was not ok (obsolete data was read).
"No stale reads": Synchronous replicas allow load balancing of consistent and up-to-date reads.
It would be great, if data could be written and read through same IP and port --> pgpool-ii?? ( I have not tested such a pgpool-ii setup. )
Was already asked here #1711, but will leave this one here open.