pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: pgsql-hackers@lists.postgresql.org
Cc: David Rowley <drowley@postgresql.org>
Subject: pg16: XX000: could not find pathkey item to sort
Date: Mon, 18 Sep 2023 09:02:09 -0500
Message-ID: <ZQhYYRhUxpW3PSf9@telsasoft.com> (raw)

This fails since 1349d2790b

commit 1349d2790bf48a4de072931c722f39337e72055e
Author: David Rowley <drowley@postgresql.org>
Date:   Tue Aug 2 23:11:45 2022 +1200

    Improve performance of ORDER BY / DISTINCT aggregates

ts=# CREATE TABLE t (a int, b text) PARTITION BY RANGE (a);
ts=# CREATE TABLE td PARTITION OF t DEFAULT;
ts=# INSERT INTO t SELECT 1 AS a, '' AS b;
ts=# SET enable_partitionwise_aggregate=on;
ts=# explain SELECT a, COUNT(DISTINCT b) FROM t GROUP BY a;
ERROR:  XX000: could not find pathkey item to sort
LOCATION:  prepare_sort_from_pathkeys, createplan.c:6235

-- 
Justin





view thread (17+ messages)  latest in thread

Message-ID: <ZQhYYRhUxpW3PSf9@telsasoft.com>
Permalink:  ../ZQhYYRhUxpW3PSf9@telsasoft.com/
Also on:    postgresql.org/message-id/ZQhYYRhUxpW3PSf9@telsasoft.com

 · 

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-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, pgsql-hackers@lists.postgresql.org, drowley@postgresql.org
  Subject: Re: pg16: XX000: could not find pathkey item to sort
  In-Reply-To: <ZQhYYRhUxpW3PSf9@telsasoft.com>

* 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