public inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: [email protected]
Subject: pgsql: Fix gistkillitems for GiST root page
Date: Tue, 07 Jul 2026 18:21:40 +0000
Message-ID: <[email protected]> (raw)
Fix gistkillitems for GiST root page
GiST index killitems feature misbehaves for single-page GiST index,
i.e. one that has only a root page. This is caused by the GiST scan's
curBlkno variable not being initialized for the first-to-scan page,
which is the root page. Fix this by moving the initializing of
curBlkno into gistScanPage(), where we also set the related curPageLSN
variable.
Commit 377b7ab145 actually added a regression test for this already,
but it merely noted that it's not working and memorized the result
where the items were not killed. Now they are, as the test shows.
This has been broken all along, but since it's just a very minor
performance issue on tiny tables, I didn't bother backpatching it.
Author: Kirill Reshke <[email protected]>
Reviewed-by: Andrey Borodin <[email protected]>
Reviewed-by: Soumya S Murali <[email protected]>
Discussion: https://postgr.es/m/CALdSSPgZWX_D8%2BFx4YQqRN5eW5iSx_rJdqQhCfdWTvqKXVfJ4w%40mail.gmail.com
Discussion: https://postgr.es/m/lxzj26ga6ippdeunz6kuncectr5gfuugmm2ry22qu6hcx6oid6@lzx3sjsqhmt6
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9c9ddf109bd8d73660ff3fef317f95bc1d7d6cc5
Modified Files
--------------
src/backend/access/gist/gistget.c | 11 +++++------
src/test/modules/index/expected/killtuples.out | 2 +-
src/test/modules/index/specs/killtuples.spec | 3 ++-
3 files changed, 8 insertions(+), 8 deletions(-)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: Fix gistkillitems for GiST root page
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox