Skip to content

Handle max_connections and other 'special' Patroni settings correctly #297

@alexeyklyukin

Description

@alexeyklyukin

There are a couple of settings, namely, max_connections, max_locks_per_transaction, max_worker_processes, max_prepared_transactions, wal_level', wal_log_hints, track_commit_timestampthat Patroni ignores unless they are set in the DCS section of the configurationbootstrap/dcs/postgresql/parameters`.

https://patroni.readthedocs.io/en/latest/dynamic_configuration.html

The operator is, sadly, unaware of that, and treats them as other settings, putting them in postgresq/parameters. That means that any user settings take no effect and the only way to change any of the setting above is by exec-ing to the pod and running patronictl edit-config.

The other part of the problem is that it is now impossible to clone a cluster with a non-default values for one of the parameter above (most frequently it happens with max_connections), as the replica won't start if it has a smaller (or just different) value for one of the parameters above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions