Re: Bug in nbtree optimization to skip > operator comparisons (or < comparisons in backwards scans)

Maxim Orlov <orlovmg@gmail.com>

From: Maxim Orlov <orlovmg@gmail.com>
To: "Anton A. Melnikov" <a.melnikov@postgrespro.ru>
Cc: Pavel Borisov <pashkin.elfe@gmail.com>, Alexander Korotkov <aekorotkov@gmail.com>, Peter Geoghegan <pg@bowt.ie>, Heikki Linnakangas <hlinnaka@iki.fi>, Matthias van de Meent <boekewurm+postgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-03-22T09:58:28Z
Lists: pgsql-hackers
I've noticed this patch and had a quick look at it.  As far as I
understand, this bug
does not lead to an incorrect matching, resulting only in degradation in
speed.
Anyway, consider this patch useful, hope it will be committed soon.

-- 
Best regards,
Maxim Orlov.

Commits

  1. Fix an oversight in refactoring in 06b10f80ba4.

  2. Make RangeTblEntry dump order consistent

  3. Improvements and fixes for e0b1ee17dc

  4. Remove BTScanOpaqueData.firstPage

  5. Optimize nbtree backward scan boundary cases.

  6. Skip checking of scan keys required for directional scan in B-tree