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: Remove obsolete nbtree equality key comments.
Date: Sun, 02 Nov 2025 18:34:50 +0000
Message-ID: <E1vFcug-004ikf-2U@gemulon.postgresql.org> (raw)

Remove obsolete nbtree equality key comments.

_bt_first reliably uses the same equality key (on each index column) for
initial positioning purposes as the one that _bt_checkkeys can use to
end the scan following commit f09816a0.  _bt_first no longer applies its
own independent rules to determine which initial positioning key to use
on each column (for equality and inequality keys alike).  Preprocessing
is now fully in control of determining which keys start and end each
scan, ensuring that _bt_first and _bt_checkkeys have symmetric behavior.

Remove obsolete comments that described why _bt_first was expected to
use at least one of the available required equality keys for initial
positioning purposes.  The rules in this area are now maximally strict
and uniform, so there's no reason to draw attention to equality keys.
Any column with a required equality key cannot have a redundant required
inequality key (nor can it have a redundant required equality key).

Oversight in commit f09816a0, which removed similar comments from
_bt_first, but missed these comments.

Author: Peter Geoghegan <pg@bowt.ie>
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/742bd91a83d009187ccf9370142408b94e5b119a

Modified Files
--------------
src/backend/access/nbtree/nbtsearch.c | 9 +++------
src/backend/access/nbtree/nbtutils.c  | 5 -----
2 files changed, 3 insertions(+), 11 deletions(-)



view thread (2+ messages)

Message-ID: <E1vFcug-004ikf-2U@gemulon.postgresql.org>
Permalink:  ../E1vFcug-004ikf-2U@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vFcug-004ikf-2U@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: Remove obsolete nbtree equality key comments.
  In-Reply-To: <E1vFcug-004ikf-2U@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