-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Shutting down postgres gracefully with docker-compose down to avoid recovery process #544
Comments
Relevant thread #184 Noting #184 (comment)
So if you want to ensure a graceful shutdown of Postgres then do a |
You could also play with stop signal and timeout, but I think TERM is what
you want (my guess is that 10 seconds just isn't enough, hence playing with
timeout).
|
My feeling is that docker-compose sends the SIGTERM but closes the container after some time, which is what you are talking about with the timeout, but doesn't really ensure that postgres is actually shutdown, and it stops the container anyway before postgres is actually shutdown. |
Right, so if you increase For my own database instances, I typically use a pretty generous |
Oh nice, it seems like |
So it seems like
|
Yeah, that seems reasonable, but at this point I think we've determined this isn't really an issue with the image (certainly not something we can fix), so I'm going to close. 👍 |
Sometimes when I shutdown postgres (v9.4.20) with
docker-compose down
(v1.23.2) , the next time that I rundocker-compose up
, postgres claimsdatabase system was not properly shut down; automatic recovery in progress
and takes forever to start back up. Even though when I shut it down the postgres logs sayreceived smart shutdown request
. Even trying withdocker-compose down -v
does not seem to resolve the issue. Here's mydocker-compose.yml
file.Any ideas on how to avoid an "automatic recovery" ?
The text was updated successfully, but these errors were encountered: