pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't try to fix eliminated nbtree array scan keys.
Date: Thu, 18 Apr 2024 15:49:02 +0000
Message-ID: <E1rxU0T-002iKQ-UF@gemulon.postgresql.org> (raw)

Don't try to fix eliminated nbtree array scan keys.

Preprocessing for nbtree index scans allowed array "input" scan keys
already marked eliminated during array-specific preprocessing to be
"fixed up" during preprocessing proper.  This allowed eliminated scan
keys on DESC index columns to spurious have their strategy commuted,
causing assertion failures.

To fix, teach _bt_fix_scankey_strategy to ignore these scan keys.  This
brings it in line with its only caller, _bt_preprocess_keys.

Oversight in commit 5bf748b8, which enhanced nbtree ScalarArrayOp
execution.

Reported-By: Donghang Lin <donghanglin@gmail.com>
Discussion: https://postgr.es/m/CAA=D8a2sHK6CAzZ=0CeafC-Y-MFXbYxnRSHvZTi=+JHu6kAa8Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f22e17f76cf569a797c45268081feadc8ebd68c7

Modified Files
--------------
src/backend/access/nbtree/nbtutils.c | 7 +++++++
1 file changed, 7 insertions(+)



view thread (2+ messages)

Message-ID: <E1rxU0T-002iKQ-UF@gemulon.postgresql.org>
Permalink:  ../E1rxU0T-002iKQ-UF@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rxU0T-002iKQ-UF@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: Don't try to fix eliminated nbtree array scan keys.
  In-Reply-To: <E1rxU0T-002iKQ-UF@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox