forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6f47f68
committed
Handle non-chain tuples outside of heap_prune_chain()
Handle dead branches of aborted HOT chains outside heap_prune_chain()as a separate phase. This simplifies the logic in heap_prune_chain(),as well as allowing us to clean up more RECENTLY_DEAD -> DEAD chains.To accomplish this efficiently, partition tuples into HOT and non-HOTwhile first collecting visibility information for each tuple inheap_page_prune(). Then call heap_prune_chain() only on potentialchain members. Then mop up the leftover HOT tuples afterwards.As part of this, keep track of which items on page have already beenprocessed, in 'processed' array. This replaces the 'marked' arraywhich was only set for tuples marked for removal or redirection. The'processed' array is updated also for items that are left unchanged,when we conclude that an item can be left unchanged. At the end ofpruning, every item on the page should be marked as processed in thearray; an assertion is added for that.Author: Melanie Plageman <melanieplageman@gmail.com>Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>Discussion:https://www.postgresql.org/message-id/20240330055710.kqg6ii2cdojsxgje@liskov1 parent7aa00f1 commit6f47f68
1 file changed
+187
-102
lines changed0 commit comments
Comments
(0)