Repository navigation
feat: default smartShutdownTimeout to 0 seconds - #11944
Merged
Merged
Conversation
Contributor
Author
|
/test |
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
Contributor
|
@gbartolini, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/44097058711 |
Change the default of `.spec.smartShutdownTimeout` from 180 to 0, so that new clusters skip the smart shutdown phase and request a fast shutdown (still preceded by a CHECKPOINT) as soon as a PostgreSQL Pod is terminated. The smart phase waits for clients to disconnect and rarely completes with long-lived application and pooler connections, delaying node drains and rolling updates. Existing clusters keep the value already persisted in their spec. Add an "Upgrading to 1.31.0" section explaining how to set the previous value explicitly. Assisted-by: Claude Signed-off-by: Gabriele Bartolini <[email protected]>
mnencia
force-pushed
the
dev/smart-shutdown-default-0
branch
from
November 18, 2026 08:46
c89bd82 to
10e3838
Compare
Signed-off-by: Leonardo Cecchi <[email protected]>
leonardoce
approved these changes
Nov 18, 2026
The upgrade note described the change only for a terminated Pod. An in-place restart of the primary shuts PostgreSQL down through the same procedure, so a cluster using the new default no longer waits for clients there either. State that the behavior depends on the default being in use, and mention in-place restarts in the shutdown procedure. An existing cluster keeps the stored value when it is patched, but takes the new default when the whole resource is replaced with a definition that does not set the field. Add this case to the upgrade note. Signed-off-by: Armando Ruocco <[email protected]>
…eout` The unit test added with the new default covers only the getter. Verify that an instance manager without an explicit timeout requests a fast shutdown as its first and only `pg_ctl stop`. Signed-off-by: Armando Ruocco <[email protected]>
armru
approved these changes
Nov 18, 2026
cnpg-bot
pushed a commit
to cloudnative-pg/api
that referenced
this pull request
Nov 18, 2026
…udnative-pg#11944) Change the default of `.spec.smartShutdownTimeout` from 180 to 0, so that new clusters skip the smart shutdown phase and request a fast shutdown (still preceded by a CHECKPOINT) as soon as a PostgreSQL Pod is terminated. The smart phase waits for clients to disconnect and rarely completes with long-lived application and pooler connections, delaying node drains and rolling updates. Existing clusters keep the value already persisted in their spec. Add an "Upgrading to 1.31.0" section explaining how to set the previous value explicitly. Closes cloudnative-pg/cloudnative-pg#11943 Assisted-by: Claude Signed-off-by: Gabriele Bartolini <[email protected]> Signed-off-by: Leonardo Cecchi <[email protected]> Signed-off-by: Armando Ruocco <[email protected]> Co-authored-by: Leonardo Cecchi <[email protected]> Co-authored-by: Armando Ruocco <[email protected]> (cherry picked from commit cloudnative-pg/cloudnative-pg@78a018f)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change the default of
.spec.smartShutdownTimeoutfrom 180 to 0, so that new clusters skip the smart shutdown phase and request a fast shutdown (still preceded by a CHECKPOINT) as soon as a PostgreSQL Pod is terminated. The smart phase waits for clients to disconnect and rarely completes with long-lived application and pooler connections, delaying node drains and rolling updates.Existing clusters keep the value already persisted in their spec. Add an "Upgrading to 1.31.0" section explaining how to set the previous value explicitly.
Closes #11943
Assisted-by: Claude