Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rKide-004Anf-PE for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jan 2024 17:33:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rKidd-0007Sy-G7 for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jan 2024 17:33:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rKibv-0004CW-Jg for pgsql-bugs@lists.postgresql.org; Tue, 02 Jan 2024 17:31:27 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rKibt-00DP5P-BW for pgsql-bugs@lists.postgresql.org; Tue, 02 Jan 2024 17:31:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 402HVMAP4103445; Tue, 2 Jan 2024 12:31:22 -0500 From: Tom Lane To: Amadeo Gallardo cc: pgsql-bugs@lists.postgresql.org, David Rowley Subject: Re: Postgres 16.1 - Bug: cache entry already complete In-reply-to: References: Comments: In-reply-to Amadeo Gallardo message dated "Tue, 02 Jan 2024 12:36:11 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4103443.1704216682.1@sss.pgh.pa.us> Date: Tue, 02 Jan 2024 12:31:22 -0500 Message-ID: <4103444.1704216682@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Amadeo Gallardo 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