Re: [SP-]GiST IOS visibility bug (was: Why doens't GiST require super-exclusive lock)

From: Matthias van de Meent <boekewurm(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>
Subject: Re: [SP-]GiST IOS visibility bug (was: Why doens't GiST require super-exclusive lock)
Date: 2026-06-05 08:28:12
Message-ID: CAEze2WiQ61UjWbqc5d9x3pTWWw24MsW2g7Be-+o4io1fKSQuVg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 3 Feb 2026 at 23:39, Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>
> On 2025-Apr-25, Matthias van de Meent wrote:
>
> > Hi,
> >
> > In the original thread [0] we established that GIST and SP-GiST
> > support index-only scans, but don't have sufficient interlocking to
> > prevent dead tuples from being revived for their scan by vacuum.
>
> Hello,
>
> This commitfest entry
> https://commitfest.postgresql.org/patch/5721/
> is stale. I would have brought it forward because it's tagged as a bug
> fix, but the patches look a bit intimidating to consider it a
> backpatchable bug fix. So, what's the status here?

Sorry for the delay. I've finally gotten back to this patch, as it's
the simpler option vs the patch in the original thread, even if it may
have a higher performance impact for GIST and SP-GIST IOS scans.

Attached is v02, which is a simple rebase with some language and
wrapping changes in comments, as well as some fixes for assert-enabled
builds.

Kind regards,

Matthias van de Meent
Databricks (https://www.databricks.com)

Attachment Content-Type Size
v02-0002-GIST-Fix-visibility-issues-in-IOS.patch application/octet-stream 6.5 KB
v02-0001-Expose-visibility-checking-shim-for-index-usage.patch application/octet-stream 12.8 KB
v02-0003-SP-GIST-Fix-visibility-issues-in-IOS.patch application/octet-stream 10.4 KB
v02-0004-Test-for-IOS-Vacuum-race-conditions-in-index-AMs.patch application/octet-stream 11.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2026-06-05 08:29:12 Re: Add per-backend lock statistics
Previous Message Yugo Nagata 2026-06-05 08:21:39 Re: Can we use Statistics Import and Export feature to perforamance testing?