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

perf: MVCC (auto)vacuum and bulk_delete improvements #465

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

neilyio
Copy link
Contributor

@neilyio neilyio commented Oct 30, 2023

Ticket(s) Closed

What

Finished review and rebase of @aragalie's #404. I intended to push to/merge that one, but GitHub closed it and won't let me re-open.

Why

All the notes from #404 still apply. I've spend the last day studying @aragalie's work to better understand VACUUM operations in Postgres. Carefully following the code paths with a debugger helped me verify that everything is being called as expected.

I can't find much information about @aragalie's change to increment stats_binding.pages_deleted instead of stats_binding.tuples_removed, as well as the change to increment stats_binding.num_pages instead of stats_binding.num_index_tuples. @aragalie, it would be great if you could comment on this change!

Otherwise, the PR seems to work well, and I'd be in favor of merging so I can build off it for an amdelete implementation.

@vercel
Copy link

vercel bot commented Oct 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
paradedb ⬜️ Ignored (Inspect) Oct 30, 2023 10:45pm

@aragalie
Copy link
Contributor

I can't find much information about @aragalie's change to increment stats_binding.pages_deleted instead of stats_binding.tuples_removed, as well as the change to increment stats_binding.num_pages instead of stats_binding.num_index_tuples. @aragalie, it would be great if you could comment on this change!

@neilyio this was done to facilitate the experience when logging.

If you turn on PG logs in conf, you'll notice that for custom indexes you only get native PG logs for num_pages and pages_deleted, as opposed to the PG indexes who also have the others.

None of these flags has any real impact functionally, so I thought that instead of saving in tuples_removed and num_index_tuples for our own index, which will then not be shown in the logs so essentially it's "useless", rather show the data in flags which will be shown and can therefore be useful for users who check logs.

In case you want to keep it as it was initially, just revert these lines.

@neilyio neilyio merged commit dc8f20c into dev Oct 31, 2023
11 checks passed
@neilyio neilyio deleted the neil/vacumm-bulk-delete branch October 31, 2023 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MVCC doesn't work properly
3 participants