| From: | Phil Florent <philflorent(at)hotmail(dot)com> | 
|---|---|
| To: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> | 
| Subject: | ERREUR: cache lookup failed for function 0 with PostgreSQL 15 beta 2, no error with PostgreSQL 14.4 | 
| Date: | 2022-08-04 13:19:59 | 
| Message-ID: | PA4P191MB160009A09B9D0624359278CFBA9F9@PA4P191MB1600.EURP191.PROD.OUTLOOK.COM | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Langote | 2022-08-04 13:21:31 | Re: enable/disable broken for statement triggers on partitioned tables | 
| Previous Message | Robert Haas | 2022-08-04 13:17:23 | Re: Smoothing the subtrans performance catastrophe |