| From: | Salma El-Sayed <salmasayed182003(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, Robert Haas <robertmhaas(at)gmail(dot)com>, Kirk Wolak <wolakk(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, obartunov(at)gmail(dot)com, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Andreas Karlsson <andreas(at)proxel(dot)se> |
| Subject: | Re: [GSoC 2026] - B-tree Index Bloat Reduction - Approach & Questions |
| Date: | 2026-09-15 10:42:42 |
| Message-ID: | CANBEAPFy8ig42RBqu0Y8gvi9P5n7ApyoX6dgypZ=AwUCPEPgTg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello Hackers,
Following up on the design details in [1], attached is the v3 patch series
for btree leaf page merging.
This version adds WAL logging for safe crash recovery of the merge
operation. It also includes WAL logging for the VACUUM cleanup operations:
clearing the BTP_MERGED (M) flag from destination pages, and converting
BTP_MERGED_AWAY (MA) pages into half-dead (HD) pages.
To recap, this patch merges two adjacent leaf pages that share a parent.
The algorithm is non-blocking and allows both forward and backward scans to
recover safely if they encounter the pages before, during, or after the
merge.
The existing nbtree resource manager has only one opcode slot remaining,
which is not enough for the three new merge-related WAL record types.
Rather than consume that last slot, we added a new resource manager
(nbtree2), following the pattern used for heap2.
Best,
Salma Elsayed
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-nbtree-Add-leaf-page-merge-support.patch | text/x-patch | 72.2 KB |
| v3-0002-pageinspect-Add-support-for-B-tree-page-merges.patch | text/x-patch | 28.6 KB |
| v3-0003-amcheck-Add-verification-for-B-tree-page-merges.patch | text/x-patch | 18.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Osama Abdul Qader | 2026-09-15 10:49:34 | Re: Severe performance degradation with concurrent updates due to excessive EvalPlanQual (EPQ) re‑evaluation |
| Previous Message | Chee Wooson | 2026-09-15 10:36:52 | [PATCH] Discard aborted updaters when expanding a multixact |