Re: Postgres 16.1 - Bug: cache entry already complete - Mailing list pgsql-bugs

From Amadeo Gallardo
Subject Re: Postgres 16.1 - Bug: cache entry already complete
Date
Msg-id CADFREbWeAhTHwCOunhXJiBEsjyZfmhCdX2=VswQ5XVwNm8JYqQ@mail.gmail.com
Whole thread Raw
In response to Re: Postgres 16.1 - Bug: cache entry already complete  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Postgres 16.1 - Bug: cache entry already complete  (Amadeo Gallardo <amadeo@ruddr.io>)
List pgsql-bugs
Hi Tom,

Thanks for reaching out. So far, I was able to narrow it down to a problem when doing a union between two tables, one of them having a varchar column and the other one having a text column. Adding an explicit cast seems to have fixed it, but not really sure why yet. I will try to create a simple repro scenario.

Thanks,

On Tue, Jan 2, 2024 at 2:31 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Amadeo Gallardo <amadeo@ruddr.io> writes:
> Upgrading from Postgres 14 to Postgres 16.1 introduced the following error
> when running a query:

> nativeError: error: select "date", coalesce(sum(hours), 0) as "hours" from
> "allocation_date" where "allocation_date"."project_id" = $1 and
> "allocation_date"."date" > $2 and "allocation_date"."hours" > $3 group by
> "date" order by "date" asc - cache entry already complete

> Note that `allocation_date` is a fairly complex view. Not quite sure what
> causes the "cache entry already complete", but it consistently failed in
> both the MacOS and Windows installations.

The only occurrence of that error string is in nodeMemoize.c, so
I suppose you've found a bug in Memoize.  A bit odd that it doesn't
manifest in v14 where Memoize came in.  But anyway, can you reduce
this to a self-contained test case?

                        regards, tom lane


--
Amadeo Gallardo
mobile: 786.961.0106

pgsql-bugs by date:

Previous
From: aa
Date:
Subject: Re: Out of the box, full text search feature suggestion for postgresql
Next
From: Tom Lane
Date:
Subject: Re: lost status 'STATUS_EOF' for authentication when using 'MD5' or 'scram-sha-256'