agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add tests for nbtree empty index predicate locking.
Date: Sat, 25 Jul 2026 18:16:18 +0000
Message-ID: <E1wngv4-00000000HZ8-464U@gemulon.postgresql.org> (raw)
Add tests for nbtree empty index predicate locking.
Add coverage for predicate locking of completely empty nbtree indexes,
where we must predicate lock the entire relation (instead of some
individual leaf page). Both paths that can find the index empty (and
must consider whether it's still empty after PredicateLockRelation
returns) are covered by a new isolation test that uses injection points.
Catalog relation scans skip the injection points. The waiting session
runs catalog queries of its own after arming the (session-local) points,
and could otherwise suspend itself with nothing lined up to wake it.
Follow-up to bugfix commits ce3f19e2 (the _bt_endpoint fix) and f9b7fc65
(the _bt_first/_bt_search fix).
Author: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/CAH2-WzkNoTn3yXY0iGkSuavJ+sL8EROf+kitW+_2v2tJVWuKmA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/62c05d6f2fa64cce44e57871b4cfcd7b34589fcf
Modified Files
--------------
src/backend/access/nbtree/nbtsearch.c | 12 +++
src/test/modules/nbtree/Makefile | 2 +
.../nbtree/expected/predicate-empty-index.out | 87 ++++++++++++++++++++++
src/test/modules/nbtree/meson.build | 5 ++
.../nbtree/specs/predicate-empty-index.spec | 73 ++++++++++++++++++
5 files changed, 179 insertions(+)
Message-ID: <E1wngv4-00000000HZ8-464U@gemulon.postgresql.org>
Permalink: ../E1wngv4-00000000HZ8-464U@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wngv4-00000000HZ8-464U@gemulon.postgresql.org
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: pgsql-committers@postgresql.org
Cc: pg@bowt.ie, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add tests for nbtree empty index predicate locking.
In-Reply-To: <E1wngv4-00000000HZ8-464U@gemulon.postgresql.org>
* 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