[bitnami/postgresql] The database is not shut down cleanly and pods start with automatic recovery
Name and Version
bitnami/postgresql 15.2.9
What architecture are you using?
None
What steps will reproduce the bug?
- deploy the postgresql chart
- initiate a pod rollout
- check the logs of the new pod
- find out that it recovered from a unclean shutdown
Are you using any custom parameters or values?
None relevant
What is the expected behavior?
The database should be shut down cleanly.
What do you see instead?
2024-05-06 21:57:04.197 GMT [96] LOG: database system was interrupted; last known up at 2024-05-06 21:52:59 GMT
2024-05-06 21:57:04.387 GMT [96] LOG: database system was not properly shut down; automatic recovery in progress
Additional information
The bitnami/postgresql-ha chart already sets a preStop hooks to initiate the clean shutdown of the database. Ideally the bitnami/postgresql chart should do the same, since relying only on SIGTERM is suboptimal as it does not terminate existing client connections.
Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.
Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.