Skip to content
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

Pruner might delete unnecessary data under heavy disk utilization #633

Open
jbearer opened this issue Jun 7, 2024 · 2 comments
Open

Pruner might delete unnecessary data under heavy disk utilization #633

jbearer opened this issue Jun 7, 2024 · 2 comments

Comments

@jbearer
Copy link
Member

jbearer commented Jun 7, 2024

We use Postgres's insight into disk utilization in deciding when to prune beyond the target retention and potentially all the way up to the minimum retention. However the disk utilization info might be stale if we have recently pruned some data that hasn't been autovacuumed yet. In this case we should just vacuum (or wait for an autovacuum) to recover space, rather than pruning further.

@imabdulbasit
Copy link
Contributor

imabdulbasit commented Jun 13, 2024

I think that waiting for auto vacuum might not be reliable and we need to clear up some space immediately. If we wait for auto vacuum then new data inserts might fail until auto vacuum kicks in. The default postgres auto vacuum settings may also cause a long delay before it runs the auto vacuum job. I am leaning more towards running manual vacuum so that new inserts do not fail.

@imabdulbasit
Copy link
Contributor

We had errors related to insufficient shared memory when running manual vacuum, which prevented the whole batch insert from succeeding, as we were committing after the vacuum job. However, the chances of manual vacuum failing should be lower now, as we commit after each batch delete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants