pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16965: Select query fails with ERROR: XX000: could not find pathkey item to sort
2+ messages / 2 participants
[nested] [flat]
* BUG #16965: Select query fails with ERROR: XX000: could not find pathkey item to sort
@ 2021-04-15 16:05 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2021-04-15 16:05 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: jakub.zemanek@gmail.com
The following bug has been logged on the website:
Bug reference: 16965
Logged by: Jakub Zemanek
Email address: jakub.zemanek@gmail.com
PostgreSQL version: 13.2
Operating system: Ubuntu 20.04
Description:
Hi,
after upgrade of our zabbix database from v 12 to v 13, we have encountered
error in select queries. When we SET max_parallel_workers_per_gather=0; then
the query finishes without error. The query looks like this:
SELECT DISTINCT COUNT(DISTINCT t.triggerid) AS rowscount,i.hostid FROM
triggers t,functions f,items i WHERE i.hostid=10406 AND
f.triggerid=t.triggerid AND f.itemid=i.itemid AND t.flags IN (0,4) GROUP BY
i.hostid;'
ERROR: XX000: could not find pathkey item to sort
LOCATION: prepare_sort_from_pathkeys, createplan.c:6013
Environment info:
psql --version
psql (PostgreSQL) 13.2 (Ubuntu 13.2-1.pgdg20.04+1)
psql -c 'select version();'
PostgreSQL 13.2 (Ubuntu 13.2-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled
by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
uname -a
Linux hostname 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021
x86_64 x86_64 x86_64 GNU/Linux
pg_ctlcluster 13 main status
pg_ctl: server is running (PID: 595329)
/usr/lib/postgresql/13/bin/postgres "-D" "/var/lib/postgresql/13/main" "-c"
"config_file=/etc/postgresql/13/main/postgresql.conf"
How to reproduce:
createdb test
wget https://www.coreit.cz/download/test.sql.gz
zcat test-plain.sql.gz | psql test
vacuumdb -z test
psql test -X -v VERBOSITY=verbose -c 'SELECT DISTINCT COUNT(DISTINCT
t.triggerid) AS rowscount,i.hostid FROM triggers t,functions f,items i WHERE
i.hostid=10406 AND f.triggerid=t.triggerid AND f.itemid=i.itemid AND t.flags
IN (0,4) GROUP BY i.hostid;'
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #16965: Select query fails with ERROR: XX000: could not find pathkey item to sort
@ 2021-04-15 21:38 Bruce Momjian <bruce@momjian.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2021-04-15 21:38 UTC (permalink / raw)
To: jakub.zemanek@gmail.com; pgsql-bugs@lists.postgresql.org
On Thu, Apr 15, 2021 at 04:05:03PM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 16965
> Logged by: Jakub Zemanek
> Email address: jakub.zemanek@gmail.com
> PostgreSQL version: 13.2
> Operating system: Ubuntu 20.04
> Description:
>
> Hi,
> after upgrade of our zabbix database from v 12 to v 13, we have encountered
> error in select queries. When we SET max_parallel_workers_per_gather=0; then
> the query finishes without error. The query looks like this:
> SELECT DISTINCT COUNT(DISTINCT t.triggerid) AS rowscount,i.hostid FROM
> triggers t,functions f,items i WHERE i.hostid=10406 AND
> f.triggerid=t.triggerid AND f.itemid=i.itemid AND t.flags IN (0,4) GROUP BY
> i.hostid;'
> ERROR: XX000: could not find pathkey item to sort
> LOCATION: prepare_sort_from_pathkeys, createplan.c:6013
This issue was reported on April 12 by someone else:
https://www.postgresql.org/message-id/flat/91f3ec99-85a4-fa55-ea74-33f85a5c651f%40swarm64.com
A patch to fix it is being considered. You might want to watch that
thread to test or apply the patch, or wait for a fix in the next minor
release.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-04-15 21:38 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 16:05 BUG #16965: Select query fails with ERROR: XX000: could not find pathkey item to sort PG Bug reporting form <noreply@postgresql.org>
2021-04-15 21:38 ` Bruce Momjian <bruce@momjian.us>
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