Re: ResultCache cache error: "cache entry already complete" in 14beta1 - Mailing list pgsql-bugs

From David Rowley
Subject Re: ResultCache cache error: "cache entry already complete" in 14beta1
Date
Msg-id CAApHDvoCrztgBHbvJ6CivVUtTW9X0zWvgLKceMxLGig-VMqHiA@mail.gmail.com
Whole thread Raw
In response to ResultCache cache error: "cache entry already complete" in 14beta1  (David Christensen <david.christensen@crunchydata.com>)
Responses Re: ResultCache cache error: "cache entry already complete" in 14beta1  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-bugs
On Fri, 21 May 2021 at 09:57, David Christensen
<david.christensen@crunchydata.com> wrote:
> CREATE TEMP TABLE fail (a INT PRIMARY KEY);
>
> SELECT att.attname
> FROM pg_index i
> JOIN pg_class d ON d.oid = i.indrelid
> JOIN generate_series(1, 32) col(i) ON col.i <= i.indnatts
> LEFT JOIN pg_attribute att ON att.attrelid = d.oid AND att.attnum = i.indkey[col.i - 1]
> WHERE d.relname = 'fail';
>
> ERROR:  cache entry already complete

Thanks for reporting this.

I've just had a quick look so far. EXPLAIN VERBOSE shows that for some
reason the join to pg_attribute.attrelid is unique.

 Nested Loop Left Join  (cost=8.59..55.40 rows=11 width=64)
   Output: att.attname
   Inner Unique: true

I'm not quite sure why it came to that conclusion, there's certainly
no unique index on that column.

I'll keep looking to see what the problem is there.

David



pgsql-bugs by date:

Previous
From: David Christensen
Date:
Subject: ResultCache cache error: "cache entry already complete" in 14beta1
Next
From: Harinath Kanchu
Date:
Subject: Trusted extension cannot be dropped by the owner of the extension