Skip to content

postgres-operator is restarting pods while not necessary #501

@stang

Description

@stang

Currently, when adding or removing .spec.patroni.slots, it seem that the way postgres-operator is handling it is by updating the top-level StatefulSet with the corresponding SPILO_CONFIGURATION environment variable in its container's definition, and let spilo handle the management of the slots.

This is systematically restarting the postgres pod.

I believe this restart can be avoided if the postgres-operator is directly updating the configuration via the patroni API (assuming the API covers the same actions as we can manually do with patronictl) and reflect the changes in the DCS so they're persisted for later usage.

This would spare some precious downtime for users who are deploying clusters with one single instance.


UPDATE: actually, it seem that despite the pod restart, the configuration is not even applied (see issue #447).
Which makes it an even better reason to not reflect this change in the SPILO_CONFIGURATION?

Or should this be logged as an issue on the spilo project and the operator simply relies on it as some kind of black box? In which case, it keeps things simpler on this end, at the expense of optimal behavior for some edge cases.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions