Closed cstohr1 closed 8 months ago
I am not familiar with the code of the postgres-operator, but I noticed that in checkAndSetGlobalPostgreSQLConfiguration
settings like SynchronousMode
are compared from effective config to desired config and updated if they are out of sync, but SynchronousNodeCount
is missing completely:
https://github.com/zalando/postgres-operator/blob/3fb3b3409463fab52cadfde5dea0d261d1f534c9/pkg/cluster/sync.go#L620
Sounds like an oversight then. You like to create a PR for it?
Opened a PR, not sure I'm doing this right because this is the first time I'm contributing to an external project on github :-) https://github.com/zalando/postgres-operator/pull/2558
tested this change locally in minikube
Thanks. Merged it. Happy to hear about your first contribution to another OS project :smiley:
https://github.com/zalando/postgres-operator/pull/1484/ introduced support for
synchronous_node_count
in the CRD, however I dont see setting this to >1 actually being reflected in the cluster. I deployed the latest postgres-operator image and this CR usingghcr.io/zalando/spilo-15:3.0-p1
:notably setting synchronous_node_count=2 and synchronous_mode=true. changes to synchronous_node_count are shown as an update event in the postgres-operator logs, but looking at the actual config on the postgres leader pod the setting is missing completely:
If I manually add
synchronous_node_count: 2
usingpatronictl edit-config
on the leader pod I can see it taking effect by checkingpsql -U postgres -c 'select application_name, sync_state from pg_stat_replication;'
.