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

From Justin Pryzby
Subject Re: ERREUR: cache lookup failed for function 0 with PostgreSQL 15 beta 2, no error with PostgreSQL 14.4
Date
Msg-id 20220804133306.GM19644@telsasoft.com
Whole thread Raw
In response to ERREUR: cache lookup failed for function 0 with PostgreSQL 15 beta 2, no error with PostgreSQL 14.4  (Phil Florent <philflorent@hotmail.com>)
List pgsql-hackers
On Thu, Aug 04, 2022 at 01:19:59PM +0000, Phil Florent wrote:
> 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 :
 

Thanks for simplifying and reporting it.

It looks like an issue with window run conditions (commit 9d9c02ccd).

+David

(gdb) b pg_re_throw
(gdb) bt
#0  pg_re_throw () at elog.c:1795
#1  0x0000557c85645e69 in errfinish (filename=<optimized out>, filename@entry=0x557c858db7da "fmgr.c",
lineno=lineno@entry=183,funcname=funcname@entry=0x557c858dc410 <__func__.24841> "fmgr_info_cxt_security") at
elog.c:588
#2  0x0000557c85650e21 in fmgr_info_cxt_security (functionId=functionId@entry=0, finfo=finfo@entry=0x557c86a05ad0,
mcxt=<optimizedout>, ignore_security=ignore_security@entry=false) at fmgr.c:183
 
#3  0x0000557c85651284 in fmgr_info (functionId=functionId@entry=0, finfo=finfo@entry=0x557c86a05ad0) at fmgr.c:128
#4  0x0000557c84b32c73 in ExecInitFunc (scratch=scratch@entry=0x7ffc369a9cf0, node=node@entry=0x557c869f59b8,
args=0x557c869f5a68,funcid=funcid@entry=0, inputcollid=inputcollid@entry=0, state=state@entry=0x557c86a05620)
 
    at execExpr.c:2748
#5  0x0000557c84b27904 in ExecInitExprRec (node=node@entry=0x557c869f59b8, state=state@entry=0x557c86a05620,
resv=resv@entry=0x557c86a05628,resnull=resnull@entry=0x557c86a05625) at execExpr.c:1147
 
#6  0x0000557c84b33a1d in ExecInitQual (qual=0x557c869f5b18, parent=parent@entry=0x557c86a05080) at execExpr.c:253
#7  0x0000557c84c8eadb in ExecInitWindowAgg (node=node@entry=0x557c869f4d20, estate=estate@entry=0x557c86a04e10,
eflags=eflags@entry=16)at nodeWindowAgg.c:2420
 
#8  0x0000557c84b8edda in ExecInitNode (node=node@entry=0x557c869f4d20, estate=estate@entry=0x557c86a04e10,
eflags=eflags@entry=16)at execProcnode.c:345
 
#9  0x0000557c84b70ea2 in InitPlan (queryDesc=queryDesc@entry=0x557c8695af50, eflags=eflags@entry=16) at
execMain.c:938
#10 0x0000557c84b71658 in standard_ExecutorStart (queryDesc=queryDesc@entry=0x557c8695af50, eflags=16, eflags@entry=0)
atexecMain.c:265
 
#11 0x0000557c84b71ca4 in ExecutorStart (queryDesc=queryDesc@entry=0x557c8695af50, eflags=0) at execMain.c:144
#12 0x0000557c8525292b in PortalStart (portal=portal@entry=0x557c869a45e0, params=params@entry=0x0,
eflags=eflags@entry=0,snapshot=snapshot@entry=0x0) at pquery.c:517
 
#13 0x0000557c8524b2a4 in exec_simple_query (
    query_string=query_string@entry=0x557c86938af0 "with fakedata as (\n", ' ' <repetidos 15 veces>, "select 'hello'
word\n",' ' <repetidos 15 veces>, "union all\n", ' ' <repetidos 15 veces>, "select 'world' word\n)\nselect *\nfrom
(\n",' ' <repetidos 15 veces>, "select word, count(*) over (partition by word) nb fro"...) at postgres.c:1204
 
#14 0x0000557c8524e8bd in PostgresMain (dbname=<optimized out>, username=username@entry=0x557c86964298 "pryzbyj") at
postgres.c:4505
#15 0x0000557c85042db6 in BackendRun (port=port@entry=0x557c8695a910) at postmaster.c:4490
#16 0x0000557c8504a79a in BackendStartup (port=port@entry=0x557c8695a910) at postmaster.c:4218
#17 0x0000557c8504ae12 in ServerLoop () at postmaster.c:1808
#18 0x0000557c8504c926 in PostmasterMain (argc=3, argv=<optimized out>) at postmaster.c:1480
#19 0x0000557c84ce4209 in main (argc=3, argv=0x557c86933000) at main.c:197

(gdb) fr 7             
#7  0x0000557c84c8eadb in ExecInitWindowAgg (node=node@entry=0x557c869f4d20, estate=estate@entry=0x557c86a04e10,
eflags=eflags@entry=16)at nodeWindowAgg.c:2420
 
2420            winstate->runcondition = ExecInitQual(node->runCondition,

-- 
Justin



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: enable/disable broken for statement triggers on partitioned tables
Next
From: Tom Lane
Date:
Subject: Re: fix typos