ERREUR: cache lookup failed for function 0 with PostgreSQL 15 beta 2, no error with PostgreSQL 14.4 - Mailing list pgsql-hackers

From Phil Florent
Subject ERREUR: cache lookup failed for function 0 with PostgreSQL 15 beta 2, no error with PostgreSQL 14.4
Date
Msg-id PA4P191MB160009A09B9D0624359278CFBA9F9@PA4P191MB1600.EURP191.PROD.OUTLOOK.COM
Whole thread Raw
Responses Re: ERREUR: cache lookup failed for function 0 with PostgreSQL 15 beta 2, no error with PostgreSQL 14.4
Re: ERREUR: cache lookup failed for function 0 with PostgreSQL 15 beta 2, no error with PostgreSQL 14.4
List pgsql-hackers
Hi,

A DSS developer from my company, Julien Roze, reported me an error I cannot explained. Is it a new behavior or a bug ?

Original query is much more complicated but here is a simplified test case with postgresql 14 and 15 beta 2 on Debian
11,packages from pgdg : 

Ver Cluster Port Status Owner    Data directory              Log file
14  main    5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
15  main    5433 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log

psql -p 5432

select version();
                                                           version
     

-----------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 14.4 (Debian 14.4-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110,
64-bit
(1 ligne)


with fakedata as (
               select 'hello' word
               union all
               select 'world' word
)
select *
from (
               select word, count(*) over (partition by word) nb from fakedata
) t where nb = 1;

  word  | nb
-------+----
 hello |  1
 world |  1
(2 lignes)


with fakedata as (
               select 'hello' word
               union all
               select 'world' word
)
select *
from (
               select word, count(*) nb from fakedata group by word
) t where nb = 1;

  word  | nb
-------+----
 hello |  1
 world |  1
(2 lignes)

psql -p 5433

 select version();
                                                              version
            

------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 15beta2 (Debian 15~beta2-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1
20210110,64-bit 
(1 ligne)

with fakedata as (
               select 'hello' word
               union all
               select 'world' word
)
select *
from (
               select word, count(*) over (partition by word) nb from fakedata
) t where nb = 1;
ERREUR:  cache lookup failed for function 0

with fakedata as (
               select 'hello' word
               union all
               select 'world' word
)
select *
from (
               select word, count(*) nb from fakedata group by word
) t where nb = 1;

 word  | nb
-------+----
 hello |  1
 world |  1
(2 lignes)


Best regards,
Phil


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Smoothing the subtrans performance catastrophe
Next
From: Amit Langote
Date:
Subject: Re: enable/disable broken for statement triggers on partitioned tables