| Patch by Anastasia Lubennikova accepted in the upcoming version of PostgreSQL

By Igor Levshin
Anastasia Lubennikova, a Postgres Pro leading developer, has reported at PGConf.India that  Peter Geoghegan had  committed recently the long-awaited B-Tree index deduplication patch to PostgreSQL.

Anastasia Lubennikova, a Postgres Pro leading developer, has reported at PGConf.India that Peter Geoghegan had committed recently the long-awaited B-Tree index deduplication patch to PostgreSQL.

The work behind this patch has been underway in Postgres Professional since 2016, and the deduplication feature has been integrated to Postgres Pro Enterprise since version 10. This feature has been improved for four years, and now the result of joint work of Anastasia Lubennikova and Peter Geoghegan is committed to the community version of PostgreSQL.

The B-Tree deduplication means that nodes with duplicate keys are merged together into a node containing the key and the reference list, similar to the way it is done in GIN indexes.

Unique indexes also benefit from deduplication as it reduces bloat from massive table updates. The new behavior can be enabled to disabled by index parameters.

The TPC-H benchmarks show a 3 times reduction of all relevant indexes size without a noticeable performance loss.

Ivan Panchenko, COO Postgres Professional, commented: "Postgres Professional, developing its products based on Open Source, considers it necessary to share its results with the community. This is one of the examples of a valuable result which we share with pleasure and hope that it will help many PostgreSQL users over the world."