Skip to content

Conversation

@gburd
Copy link
Owner

@gburd gburd commented Sep 4, 2025

No description provided.

Exercise the existing heapam page pruning code on the INSERT paths to
more pro-actively re-order heap pages and potentially free up space.
heap_page_prune_opt() doesn't take into account the size of the tuple that's
trying to be inserted, it only checks if the page has less free space than the
minimum threshold, but doesn't consider whether pruning could make enough space
for a specific tuple.  Consider pruning if the current free space plus
potential space from pruning could accommodate the tuple, even if the page
doesn't meet the normal threshold.
Add scan-time heap page pruning functionality and a mechanism to track page
modifications during scans and re-evaluate pruning eligibility.  This addresses
the issue where multiple updates during a scan don't trigger heap page pruning
until the next scan.
Set PageSetPrunable during heap_insert() and heap_multi_insert() to
enable opportunistic cleanup of dead tuples from aborted transactions.
Previously, aborted insert tuples would remain until the next vacuum
cycle if no other modifications occurred on the page.
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.

3 participants