pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Split out tiebreaker comparisons from comparetup_* functions
Date: Wed, 16 Aug 2023 10:17:35 +0000
Message-ID: <E1qWDao-000POZ-Dp@gemulon.postgresql.org> (raw)

Split out tiebreaker comparisons from comparetup_* functions

Previously, if a specialized comparator found equal datum1 keys,
the "comparetup" function would repeat the comparison on the
datum before proceeding with the unabbreviated first key
and/or additional sort keys.

Move comparing additional sort keys into "tiebreak" functions so
that specialized comparators can call these directly if needed,
avoiding duplicate work.

Reviewed by David Rowley

Discussion: https://postgr.es/m/CAFBsxsGaVfUrjTghpf%3DkDBYY%3DjWx1PN-fuusVe7Vw5s0XqGdGw%40mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/utils/sort/tuplesort.c         |   9 +--
src/backend/utils/sort/tuplesortvariants.c | 125 ++++++++++++++++++++++-------
src/include/utils/tuplesort.h              |   7 ++
3 files changed, 108 insertions(+), 33 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1qWDao-000POZ-Dp@gemulon.postgresql.org>
Permalink:  ../E1qWDao-000POZ-Dp@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qWDao-000POZ-Dp@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: john.naylor@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Split out tiebreaker comparisons from comparetup_* functions
  In-Reply-To: <E1qWDao-000POZ-Dp@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