Open dgeissl opened 1 year ago
Hi!
Thank you so much for the feature request! I will forward it to the engineering team.
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.
@javsalgar is this smth your team want's to work on or should I ignore the stale notification next time as it won't be tackeled anyways?
Hi,
I'm afraid the task is still in the backlog. I added the on-hold
label so the stale bot does not close it.
Name and Version
bitnami/postgresql*
What is the problem this feature will solve?
The default stop signal for containers seems to be SIGTERM which will lead to a greaceful shutdown, waiting for any connections until they are closed before terminating the postgresql process. This can be seen in the Log during shutdown:
The downside is that your typical runtime does not wait forever (docker stop 10s, k8s 30s) and will just kill your process if it did not finish within that timeframe:
this will likely cause data corruptions and has been discussed in the Docker "Official Image".
What is the feature you are proposing to solve the problem?
The discussion https://github.com/docker-library/postgres/issues/714 resulted in changing the default termination signal to SIGINT (see https://github.com/docker-library/postgres/pull/763).
I think it would also be beneficial to make this the default on bitnami images. Changing the behavior by the docker-compose.yaml led to the following log output that looked way better than before:
What alternatives have you considered?
We can change the signal in our own derived images. on the docker cli with
docker run ---stop-signal=SIGINT
of for docker compose with:In kubernetes there seems to be a ongoing discussion https://github.com/kubernetes/kubernetes/issues/30051 to support that but it's currently only possible if you build your own image (at least that's what I found).
Having said that I'll fix this in my derived images, but one should consider making that the default.