pghoard
pghoard copied to clipboard
handle a graceful shutdown on request
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.
:/ Build failing, seems rohmu got updated again (using Protocol, not supported on 3.7)
:/ 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. That raises the question on whether we want to support a Python version on pghoard that is no longer officially supported and will no longer receive security patches. I'd be in favour of removing 3.7 from the CI here.
@kathia-barahona can you mark this as draft until it is ready for review.
Also, do you know why this was not merged in 2023 when it was originally proposed?
@kathia-barahona can you mark this as draft until it is ready for review. Also, do you know why this was not merged in 2023 when it was originally proposed?
@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). But we recently got a case were we lost a WAL file in between because of a network issue, so I think now this can actually help with that (I just added a couple of improvements)