| From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix nbtree unsatisfiable row compare assertion failure. |
| Date: | 2026-10-17 15:04:20 |
| Message-ID: | E1xI5xM-000000021U3-2yvs@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix nbtree unsatisfiable row compare assertion failure.
An assertion within nbtree preprocessing's _bt_mark_scankey_required
function expects the first member key of a row compare to have the same
strategy as its header key, which its caller passes. But the first row
member key won't necessarily have been commuted in cases where the row
compare is unsatisfiable due to its first member key having a NULL
argument. This led to spurious assertion failures in the single key
fast path call to _bt_mark_scankey_required.
To fix, always commute the row members, even when the row compare is
unsatisfiable. That way the header and its members will always agree on
strategy.
Oversight in commit ec986020, which improved nbtree's unsatisfiable
RowCompare detection.
Author: Peter Geoghegan <pg(at)bowt(dot)ie>
Backpatch-through: 18
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/45fc51fcbf4534ea2f6f85e36f8155dbd5ba9851
Modified Files
--------------
src/backend/access/nbtree/nbtpreprocesskeys.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-10-18 22:09:30 | pgsql: test_custom_stats: Stabilize test for counters |
| Previous Message | Richard Guo | 2026-10-17 08:21:03 | pgsql: Fix bogus outer-join commutation with lateral refs in PlaceHolde |