pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Remove replacement selection sort.
Date: Fri, 29 Sep 2017 14:28:35 +0000
Message-ID: <E1dxwHL-0002XD-5M@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Remove replacement selection sort.

At the time replacement_sort_tuples was introduced, there were still
cases where replacement selection sort noticeably outperformed using
quicksort even for the first run.  However, those cases seem to have
evaporated as a result of further improvements made since that time
(and perhaps also advances in CPU technology).  So remove replacement
selection and the controlling GUC entirely.  This makes tuplesort.c
noticeably simpler and probably paves the way for further
optimizations someone might want to do later.

Peter Geoghegan, with review and testing by Tomas Vondra and me.

Discussion: https://postgr.es/m/CAH2-WzmmNjG_K0R9nqYwMq3zjyJJK+hCbiZYNGhAy-Zyjs64GQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8b304b8b72b0a60f1968d39f01cf817c8df863ec

Modified Files
--------------
doc/src/sgml/config.sgml                      |  39 ---
doc/src/sgml/release-9.6.sgml                 |   2 +-
src/backend/utils/init/globals.c              |   1 -
src/backend/utils/misc/guc.c                  |  10 -
src/backend/utils/misc/postgresql.conf.sample |   1 -
src/backend/utils/sort/tuplesort.c            | 415 +++-----------------------
src/include/miscadmin.h                       |   1 -
src/test/regress/expected/cluster.out         |  17 +-
src/test/regress/sql/cluster.sql              |  14 +-
9 files changed, 52 insertions(+), 448 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1dxwHL-0002XD-5M@gemulon.postgresql.org>
Permalink:  ../E1dxwHL-0002XD-5M@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dxwHL-0002XD-5M@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: rhaas@postgresql.org
  Subject: Re: pgsql: Remove replacement selection sort.
  In-Reply-To: <E1dxwHL-0002XD-5M@gemulon.postgresql.org>
  References: <E1dxwHL-0002XD-5M@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