Repository navigation
Description
Is there an existing issue already for this feature request/idea?
- I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated.
What problem is this feature going to solve? Why should it be added?
An upgrade of the operator triggers a rolling update on any Postgres cluster managed by the operator. While this is not a problem in the case of a small number of clusters, it might create problems for larger fleets.
Describe the solution you'd like
While waiting for maintenance windows (#14) we should introduce two new fields to the status:
lastUpdateTimestamp: storing the timestamp of the last successful update of the cluster object (if null, no previous update has been done)nextUpdateTimestamp: storing the timestamp of the next scheduled update of the cluster object (if null, no update is scheduled)
The idea is that the first reconciliation loop after nextUpdateTimestamp triggers an update, following the same rules as the supervised/unsupervised method and strategy.
In terms of usability, we should clearly highlight that the next update of the cluster will happen at nextUpdateTimeStamp (if not null). This includes the cnpg status command.
As part of this ticket we should also define a default update window of 10 minutes (we can choose a different value, but make sure it is a global constant for now - we can address customisation in a follow-up ticket which also considers #14). The idea is that, following an operator upgrade process or a change of the image catalog, instead of immediately triggering the update, we randomly throw a value between the current timestamp and the above window, and set the nextUpdateTimestamp.
This should randomly distribute in the space of 10 minutes all the cluster updates.
Describe alternatives you've considered
This path had already been decided a couple of years ago, when we introduced the concept of current/target primary and primary timestamp fields, but the implementation had been postponed.
Additional context
This work is preliminary for maintenance windows in #14
We should also consider another important aspect: interaction of this with any rolling update process. Ideally, all updates should be gated by this feature.
Backport?
No
Are you willing to actively contribute to this feature?
Yes
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
- StatusShow more project fieldsBacklog
Activity
8 remaining items
github-actions commentedon Oct 22, 2025
This issue is stale because it has been open for 60 days with no activity.
github-actions commentedon Nov 5, 2025
This issue was closed because it has been inactive for 14 days since being marked as stale.