pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Adjust tuplesort API to have bitwise option flags
Date: Mon, 04 Apr 2022 10:25:26 +0000
Message-ID: <E1nbJtl-000Gd3-I3@gemulon.postgresql.org> (raw)

Adjust tuplesort API to have bitwise option flags

This replaces the bool flag for randomAccess.  An upcoming patch requires
adding another option, so instead of breaking the API for that, then
breaking it again one day if we add more options, let's just break it
once.  Any boolean options we add in the future will just make use of an
unused bit in the flags.

Any extensions making use of tuplesorts will need to update their code
to pass TUPLESORT_RANDOMACCESS instead of true for randomAccess.
TUPLESORT_NONE can be used for a set of empty options.

Author: David Rowley
Reviewed-by: Justin Pryzby
Discussion: https://postgr.es/m/CAApHDvoH4ASzsAOyHcxkuY01Qf%2B%2B8JJ0paw%2B03dk%2BW25tQEcNQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/77bae396df3f6f883f58f1877b7c08eb3ebb6b63

Modified Files
--------------
src/backend/access/gist/gistbuild.c        |   2 +-
src/backend/access/hash/hashsort.c         |   2 +-
src/backend/access/heap/heapam_handler.c   |   2 +-
src/backend/access/nbtree/nbtsort.c        |   6 +-
src/backend/catalog/index.c                |   2 +-
src/backend/executor/nodeAgg.c             |   6 +-
src/backend/executor/nodeIncrementalSort.c |   4 +-
src/backend/executor/nodeSort.c            |   8 ++-
src/backend/utils/adt/orderedsetaggs.c     |  10 ++-
src/backend/utils/sort/tuplesort.c         | 111 ++++++++++++++++-------------
src/include/utils/tuplesort.h              |  19 +++--
11 files changed, 99 insertions(+), 73 deletions(-)



Message-ID: <E1nbJtl-000Gd3-I3@gemulon.postgresql.org>
Permalink:  ../E1nbJtl-000Gd3-I3@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nbJtl-000Gd3-I3@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org
  Subject: Re: pgsql: Adjust tuplesort API to have bitwise option flags
  In-Reply-To: <E1nbJtl-000Gd3-I3@gemulon.postgresql.org>
  References: <E1nbJtl-000Gd3-I3@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