Re: Improve cube GiST page splits

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Rustam ALLAKOV <rustamallakov(at)gmail(dot)com>
Cc: pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improve cube GiST page splits
Date: 2026-11-02 17:57:53
Message-ID: 662B6A70-7FED-42C3-AF27-A0C635C7EBEE@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Rustam,

Thank you for the detailed review and benchmarks!

On September 30, 2026, Rustam ALLAKOV wrote:
> However, I found two cases where data that master accepts now makes
> the page split fail with an ERROR.

Both are regressions in my patch. In v2, coordinate and bounding
interval comparisons use PostgreSQL's float8 ordering. Split-quality
estimates use plain C arithmetic rather than SQL arithmetic that can
throw an error.
Dimensions with a non-finite or zero range are skipped. If no dimension
can provide a split, the existing fallback divides the entries evenly.

I added regression coverage for both incremental insertion and CREATE
INDEX on existing data, including your examples, infinities, and an
underflow case.

PFA v2.

Thank you!

Best regards, Andrey Borodin.

Attachment Content-Type Size
v2-0001-Add-regression-coverage-for-cube-GiST-page-splits.patch application/octet-stream 12.7 KB
v2-0002-Use-double-sorting-for-cube-GiST-page-splits.patch application/octet-stream 18.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ritesh Kumar 2026-11-02 18:23:54 Re: Fix recovery conflict canceling the startup progress timeout
Previous Message Nathan Bossart 2026-11-02 17:50:52 Re: [PATCH] Periodically refresh database frozen IDs during autovacuum