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

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Subject: Re: Bug in nbtree optimization to skip > operator comparisons (or < comparisons in backwards scans)
Date: 2023-12-06 01:45:41
Message-ID: CAH2-WzmhnfpYhZKeyMuA2SCvSQGzw-2iCbyW-+6hhZgOnSzfLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 5, 2023 at 4:41 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> "In general, when inequality keys are present, the initial-positioning
> code only promises to position before the first possible match, not
> exactly at the first match, for a forward scan; or after the last
> match for a backward scan."
>
> My test case mostly just demonstrates how to reproduce the scenario
> described by this sentence.

I just realized that my test case wasn't quite minimized correctly. It
depended on a custom function that was no longer created.

Attached is a revised version that uses btint84cmp instead.

--
Peter Geoghegan

Attachment Content-Type Size
require_opposite_dir_repro_v2.sql application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2023-12-06 01:50:02 ExecSetupTransitionCaptureState not declared in nodeModifyTable.c
Previous Message Michael Paquier 2023-12-06 01:17:56 Re: Test 002_pg_upgrade fails with olddump on Windows