Skip to content

Conversation

@mkreidenweis-schulmngr
Copy link
Contributor

@mkreidenweis-schulmngr mkreidenweis-schulmngr commented Dec 9, 2025

This feature is fully available starting with Kubernetes v1.34, see kubernetes/enhancements#3960

This can help prevent errors 57P01 "PgDog is shutting down" for client queries, by ensuring clients connect to another PgDog instance before PgDog is actually shut down. During the configured sleep period, Kubernetes will keep the Pod in "Terminating" state while PgDog is still running, accepting and processing queries. Kubernetes removes the Pod IP from the Service immediately, so that clients won't establish new connections to the shutting-down Pod.

This works very similar to the --shutdown-grace-period param in ingress-nginx.


I also noticed some superfluous newlines in the Helm-generated YAML, which I fixed in a separate commit.

Copy link
Contributor

@levkk levkk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@levkk levkk merged commit d651473 into pgdogdev:main Dec 9, 2025
@mkreidenweis-schulmngr mkreidenweis-schulmngr deleted the add-pre-stop-sleep branch December 19, 2025 07:38
@mkreidenweis-schulmngr
Copy link
Contributor Author

Thanks for merging this so fast. Would you mind creating a new release of the Helm chart so that we can deploy with this feature more easily?

@sbschorer
Copy link

Hey @levkk,

is it possible to release this feature in the near future?

@levkk
Copy link
Contributor

levkk commented Dec 19, 2025

Sure thing, will cut a release today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants