zalando / zalando/postgres-operator

Patroni config params are not reverting to their default values upon removal from PostgreSQL configuration

Open
#3,061 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Please, answer some short questions which should help us to understand your problem / question better?

Due to an issue with the my environment, it was necessary to increase the following values of loop_wait, retry_timeout, and ttl.
This was done by updating PostgreSQL configuration as follows
oc get postgresql postgres -o json | jq -r '.spec.patroni' { "loop_wait": 60, "retry_timeout": 60, "ttl": 180 }
All changes were correctly applied without any manual intervention.

Upon resolution of environmental issue, same set of values was removed from PostgreSQL configuration.
Problem is that the those values were not removed from the Patroni configuration, they remained the same. This was tested by checking patronictl show-config output and directly in postgres.yml
Expectation was that they would be assigned to their corresponding default values.
https://patroni.readthedocs.io/en/latest/dynamic_configuration.html

Is this expected behaviour or a bug?
Once, when Patroni configuration is specified within the PostgreSQL configuration, is it necessary for us to manage it manually, or can the operator ensure that the correct values are applied when such configuration is removed?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the change using the PostgreSQL configuration and compare patronictl show-config with the generated postgres.yml before and after removing loop_wait, retry_timeout, and ttl. Start by tracing how the operator applies the spec.patroni values; done means removing a value restores its corresponding Patroni default without manual intervention.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.