From: Tom Lane <tgl@sss.pgh.pa.us>
To: sara.pranke@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15250: ERROR: could not find pathkey item to sort
Date: Wed, 20 Jun 2018 21:44:56 -0400
Message-ID: <12273.1529545496@sss.pgh.pa.us> (raw)
In-Reply-To: <152952849928.1252.6596277019511618168@wrigleys.postgresql.org>
References: <152952849928.1252.6596277019511618168@wrigleys.postgresql.org>
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> I have complex queries in large tables that use memory for sorting items, we
> upgrate PostgreSQL from 9.1 to 9.4 and in this version we get this error:
> 'could not find pathkey item to sort'
That's a fairly common visible symptom for erroneous construction of a
plan inside the planner. It has nothing directly to do with memory
consumption, although it's possible that changing work_mem would encourage
the planner to choose a different plan shape that avoids the bug.
Another likely explanation for the problem appearing and disappearing is
that it could be sensitive to the current statistics for the table(s)
the query is on, in which case a background auto-analyze might be enough
to flip you from the plan shape with the problem to the plan shape
without.
Anyway, we'd certainly be interested to fix the problem if you can provide
a self-contained, reproducible test case. I'd suggest trying to generate
some dummy data that the query fails on.
regards, tom lane
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, sara.pranke@gmail.com
Subject: Re: BUG #15250: ERROR: could not find pathkey item to sort
In-Reply-To: <12273.1529545496@sss.pgh.pa.us>
References: <152952849928.1252.6596277019511618168@wrigleys.postgresql.org> <12273.1529545496@sss.pgh.pa.us>
* 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