-
Notifications
You must be signed in to change notification settings - Fork 100
handle a graceful shutdown on request #594
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
base: main
Are you sure you want to change the base?
Conversation
2e5b1c6
to
2db19a6
Compare
:/ Build failing, seems rohmu got updated again (using Protocol, not supported on 3.7) |
To be noted that Python 3.7 reached EOL a week ago. |
2db19a6
to
b9e7bfb
Compare
74b8995
to
ed1f39c
Compare
def47a1
to
d99517e
Compare
Make sure that queues are emptied and all files are uploaded before shuting down. This way we make sure that all WAL files are compressed and uploaded before pghoard getshutdown. [BF-3320]
d99517e
to
cc0e06f
Compare
@kathia-barahona can you mark this as draft until it is ready for review. |
@Claudenw I am aware of it. At that time I thought this solution was not that necessary, since just stopping pghoard before postgresql seemed to solve the issue we were having (missing the last WAL file). |
About this change - What it does
Handles graceful shutdowns by making sure all compressed files get uploaded
(considers also partial files)Edit: renaming partial files is dangerous, after testing I didn't got the expected results (duplicated segments on different timelines)
Why this way
Shutting down pghoard can be dangerous, leading to missed segments if not all information was uploaded. To avoid this, its better to make sure all tasks/events were completed.