nbtree backwards scan test coverage

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: nbtree backwards scan test coverage
Date: 2026-07-19 23:23:03
Message-ID: CAH2-WzmD+jUBOpFS2jrnqqrdPSAjoxqyL9FPKaE1BtnY=8Nntg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Attached patches add an isolation test to the nbtree test module,
which uses injection points. This provides thorough test coverage for
nbtree backwards scans, including cases where we must recover from
concurrent page splits, and page deletions by VACUUM.

The tests assume a default BLCKSZ of 8KiB. It would be difficult and
likely not worth it to get the tests passing under any alternative
BLCKSZ. We certainly rely on that assumption elsewhere to achieve the
expected test coverage. However, this specific test goes further: it
visibly fails on a non-default BLCKSZ. I think that that's probably
okay, but I wanted to flag it.

--
Peter Geoghegan

Attachment Content-Type Size
v1-0001-Run-nbtree-test-module-tests-under-autoconf-build.patch application/octet-stream 1.1 KB
v1-0002-Add-test-coverage-for-nbtree-backwards-scans.patch application/octet-stream 18.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2026-07-20 00:33:14 nbtree _bt_set_startikey row compare test coverage
Previous Message Peter Geoghegan 2026-07-19 23:14:22 nbtree test module Makefile oversight