PostgreSQL 13 B-Trees will be able to use deduplication, which I committed today. It often make indexes far smaller. Also helps VACUUM with controlling index bloat (even in unique indexes). I wrote some documentations on the internals, for advanced users: postgresql.org/docs/devel/btr
Conversation
Replying to
Is this going to enable automatically for indexes after a pg_upgrade (lazily, obviously) , or is a reindex going to be required?
1
Replying to
REINDEX required. It could work with v12 indexes lazily if pg_upgrade were taught to set the metapage field automatically, but I didn't bother with that. Even if I did, it wouldn't immediately shrink the index after upgrade.
Replying to
Ah dang. Yeah with the laziness the payoff isn't direct so probably not worth that change.
So note to self - upgrade OS at the same time as to pg 13 because then you have to reindex half the world anyway because of the collation changes :-)
5

