pghoard icon indicating copy to clipboard operation
pghoard copied to clipboard

handle a graceful shutdown on request

Open kathia-barahona opened this issue 2 years ago • 2 comments

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.

kathia-barahona avatar Jul 04 '23 08:07 kathia-barahona

:/ Build failing, seems rohmu got updated again (using Protocol, not supported on 3.7)

kathia-barahona avatar Jul 05 '23 09:07 kathia-barahona

:/ 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.

Mulugruntz avatar Jul 05 '23 09:07 Mulugruntz

@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 avatar Jul 28 '25 15:07 Claudenw

@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)

kathia-barahona avatar Jul 29 '25 09:07 kathia-barahona