Conversation

I just wonder what happens if multiple keys with the same value are deduplicated and then all the others except one key are deleted. If each entry is not marked as LP_DEAD, unncessary lookup for the table can happen?
Quote Tweet
Regarding B-tree deduplication, LP_DEAD flag is set in the posting list only when all the entries in the list are known as dead? Or each entry can be marked as LP_DEAD? #PostgreSQL
1
1
Replying to
Yes, it can, but it's not too bad in practice. Remember that deduplication is lazy, and only happens when the alternative is a page split. We must have not have had any LP_DEAD bits set when any dedup pass happens (if we did there would be no dedup pass at all).
2
2