Repository navigation
Conversation
|
❗ By default, the pull request is configured to backport to all release branches.
|
|
/test limit=local |
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18529484354 |
|
This should be backported as it is a minor change that prevents interference with some existing Postgres configurations. |
f1c4b8b to
157c727
Compare
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18554902297 |
| db, err := r.instance.GetSuperUserDB() | ||
| if err != nil { | ||
| contextLogger.Error(err, "Cannot connect to primary server") | ||
| } else { | ||
| _, err = db.Exec("CHECKPOINT") | ||
| if err != nil { | ||
| contextLogger.Error(err, "Error while requesting a checkpoint") | ||
| } | ||
| } | ||
|
|
||
| contextLogger.Info("This is an old primary node. Shutting it down to get it demoted to a replica") |
CHECKPOINT before smart and fast shutdowns
|
/test |
|
@gbartolini, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18616741642 |
Issue CHECKPOINT before shutdown to reduce shutdown time and subsequent replica promotion time for systems with high checkpoint_timeout. Follows best-effort pattern from instance_controller.go - logs errors but continues with shutdown. Skips checkpoint for immediate mode. Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Run a `CHECKPOINT` before every PostgreSQL `smart` and `fast` shutdown request to reduce both shutdown duration and replica promotion time, especially in systems with a high `checkpoint_timeout`. This follows the best-effort approach used in `instance_controller.go`: errors during the checkpoint are logged, but the shutdown proceeds regardless. The checkpoint step is skipped for `immediate` shutdown mode. Closes #8865 Signed-off-by: Armando Ruocco <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]> Co-authored-by: Gabriele Bartolini <[email protected]> (cherry picked from commit d7b98ad)
Run a `CHECKPOINT` before every PostgreSQL `smart` and `fast` shutdown request to reduce both shutdown duration and replica promotion time, especially in systems with a high `checkpoint_timeout`. This follows the best-effort approach used in `instance_controller.go`: errors during the checkpoint are logged, but the shutdown proceeds regardless. The checkpoint step is skipped for `immediate` shutdown mode. Closes #8865 Signed-off-by: Armando Ruocco <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]> Co-authored-by: Gabriele Bartolini <[email protected]> (cherry picked from commit d7b98ad)
Run a `CHECKPOINT` before every PostgreSQL `smart` and `fast` shutdown request to reduce both shutdown duration and replica promotion time, especially in systems with a high `checkpoint_timeout`. This follows the best-effort approach used in `instance_controller.go`: errors during the checkpoint are logged, but the shutdown proceeds regardless. The checkpoint step is skipped for `immediate` shutdown mode. Closes #8865 Signed-off-by: Armando Ruocco <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]> Co-authored-by: Gabriele Bartolini <[email protected]> (cherry picked from commit d7b98ad)
Run a
CHECKPOINTbefore every PostgreSQLsmartandfastshutdown request to reduce both shutdown duration and replica promotion time, especially in systems with a highcheckpoint_timeout.This follows the best-effort approach used in
instance_controller.go: errors during the checkpoint are logged, but the shutdown proceeds regardless. The checkpoint step is skipped forimmediateshutdown mode.Closes #8865