Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch shutdown to use fast shutdown #14

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

boustrophedon
Copy link
Owner

  • SIGKILL causes shared memory and segfaults to leak https://www.postgresql.org/docs/current/server-shutdown.html
  • Just using SIGTERM everywhere creates deadlock conditions when used with connection poolers in some cases, but it would be nice to have a graceful shutdown option eventually.
  • Ended up using SIGINT fast shutdown mode, which actively terminates connections rather than waiting for them to complete.
  • This is technically a breaking change because using the persist option does not using graceful shutdown anymore.

- SIGKILL causes shared memory and segfaults to leak
  <https://www.postgresql.org/docs/current/server-shutdown.html>
- Just using SIGTERM everywhere creates deadlock conditions when used
  with connection poolers in some cases, but it would be nice to have a
graceful shutdown option eventually.
- Ended up using SIGINT fast shutdown mode, which actively terminates
  connections rather than waiting for them to complete.
- This is technically a breaking change because using the persist option
  does not using graceful shutdown anymore.
@boustrophedon boustrophedon merged commit 60f83fb into master Sep 24, 2024
7 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11006865061

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 24 of 25 (96.0%) changed or added relevant lines in 1 file are covered.
  • 14 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-1.2%) to 84.902%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib.rs 24 25 96.0%
Files with Coverage Reduction New Missed Lines %
src/daemon.rs 14 77.55%
Totals Coverage Status
Change from base Build 10434873697: -1.2%
Covered Lines: 478
Relevant Lines: 563

💛 - Coveralls

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.

2 participants