pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix CLUSTER on expression indexes.
Date: Tue, 15 Oct 2019 17:46:12 +0000
Message-ID: <E1iKQtg-00049c-0N@gemulon.postgresql.org> (raw)

Fix CLUSTER on expression indexes.

Since the introduction of different slot types, in 1a0586de3657, we
create a virtual slot in tuplesort_begin_cluster(). While that looks
right, it unfortunately doesn't actually work, as ExecStoreHeapTuple()
is used to store tuples in the slot. Unfortunately no regression tests
for CLUSTER on expression indexes existed so far.

Fix the slot type, and add bare bones tests for CLUSTER on expression
indexes.

Reported-By: Justin Pryzby
Author: Andres Freund
Discussion: https://postgr.es/m/20191011210320.GS10470@telsasoft.com
Backpatch: 12, like 1a0586de3657

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6d3fe6b6bf05777cb7152b462594a1993af15857

Modified Files
--------------
src/backend/utils/sort/tuplesort.c    |   2 +-
src/test/regress/expected/cluster.out | 107 ++++++++++++++++++++++++++++++++++
src/test/regress/sql/cluster.sql      |  37 ++++++++++++
3 files changed, 145 insertions(+), 1 deletion(-)



view thread (2+ messages)

Message-ID: <E1iKQtg-00049c-0N@gemulon.postgresql.org>
Permalink:  ../E1iKQtg-00049c-0N@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iKQtg-00049c-0N@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: andres@anarazel.de
  Subject: Re: pgsql: Fix CLUSTER on expression indexes.
  In-Reply-To: <E1iKQtg-00049c-0N@gemulon.postgresql.org>
  References: <E1iKQtg-00049c-0N@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