Re: ResultCache cache error: "cache entry already complete" in 14beta1

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: David Christensen <david(dot)christensen(at)crunchydata(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, David Rowley <drowley(at)postgresql(dot)org>
Subject: Re: ResultCache cache error: "cache entry already complete" in 14beta1
Date: 2021-05-20 22:22:06
Message-ID: CAApHDvoCrztgBHbvJ6CivVUtTW9X0zWvgLKceMxLGig-VMqHiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, 21 May 2021 at 09:57, David Christensen
<david(dot)christensen(at)crunchydata(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Harinath Kanchu 2021-05-20 22:54:22 Trusted extension cannot be dropped by the owner of the extension
Previous Message David Christensen 2021-05-20 21:57:22 ResultCache cache error: "cache entry already complete" in 14beta1