From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-bugs@postgresql.org
Subject: Security definer "generated column" function used in index
Date: Fri, 09 Dec 2011 12:49:06 -0600
Message-ID: <4EE203C20200002500043B7D@gw.wicourts.gov> (raw)
PostgreSQL version 9.0.4, 64 bit.
Linux version 2.6.16.60-0.39.3-smp (geeko@buildhost)
(gcc version 4.1.2 20070115 (SUSE Linux))
#1 SMP Mon May 11 11:46:34 UTC 2009
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 2
We flagged some functions as SECURITY DEFINER and had queries which
had been in use for months suddenly fail to complete. We set them
back to SECURITY INVOKER and things returned to normal. I took
stack traces of the four connections with queries which seemed to be
"stuck". They all had this sequence of calls in the middle:
#13 0x000000000054a5b6
in fmgr_sql (fcinfo=0x7fff9eec0b30)
at functions.c:441
#14 0x00000000006a2f05
in fmgr_security_definer (fcinfo=0x30006)
at fmgr.c:957
#15 0x0000000000544047
in ExecMakeFunctionResult (fcache=0x512ac70, econtext=0x512aa80,
isNull=0x512b8a8 "", isDone=0x512b9c0)
at execQual.c:1827
#16 0x0000000000540fb7
in ExecProject (projInfo=<value optimized out>,
isDone=0x7fff9eec101c)
at execQual.c:5089
#17 0x0000000000555403
in ExecResult (node=0x512a970)
at nodeResult.c:155
#18 0x00000000005409a6
in ExecProcNode (node=0x512a970)
at execProcnode.c:355
#19 0x000000000053f891
in standard_ExecutorRun (queryDesc=0x2b4121b11280,
direction=-1628699568, count=1)
at execMain.c:1188
#20 0x000000000054a656
in fmgr_sql (fcinfo=0x7fff9eec1310)
at functions.c:475
#21 0x00000000006a2f05
in fmgr_security_definer (fcinfo=0x30006)
at fmgr.c:957
#22 0x0000000000545ef0
in ExecMakeFunctionResultNoSets (fcache=0x2b4121aa2b98,
econtext=0x2b4121aa1798,
isNull=0x7fff9eec1a90 "",
isDone=<value optimized out>)
at execQual.c:1894
#23 0x0000000000545e6c
in ExecMakeFunctionResultNoSets (fcache=0x2b4121aa2358,
econtext=0x2b4121aa1798,
isNull=0x7fff9eec1b8f "",
isDone=<value optimized out>)
at execQual.c:1866
#24 0x0000000000545f8f
in ExecQual (qual=<value optimized out>, econtext=0x2b4121aa1798,
resultForNull=0 '\0')
at execQual.c:4991
#25 0x00000000005476ef
in ExecScan (node=0x2b4121aa1688, accessMtd=0x5511a0 <IndexNext>,
recheckMtd=0x551150 <IndexRecheck>)
at execScan.c:192
#26 0x00000000005409ea
in ExecProcNode (node=0x2b4121aa1688)
at execProcnode.c:382
#27 0x0000000000554935
in ExecNestLoop (node=0x2b4121a9dea0)
at nodeNestloop.c:154
#28 0x0000000000540a6a
in ExecProcNode (node=0x2b4121a9dea0)
at execProcnode.c:419
Full (unedited) stack traces for all four attached.
Notice the recursive calls to fmgr_security_definer(). I wonder
whether that might be a problem, since the comment for that function
says:
| This is not re-entrant, but then the fcinfo itself can't be used
| re-entrantly anyway.
All of these queries are similar, and involved searches using a LIKE
clause against a "searchName" "generated column" -- a function
taking the record type of the table as its parameter. That function
then calls a function which takes several parameters, Both
functions were changed to SECURITY DEFINER when the problems
started.
The functions are:
CREATE OR REPLACE FUNCTION "searchName"(rec "Party")
RETURNS "SearchNameT"
LANGUAGE sql
IMMUTABLE
AS $$
select "searchName"($1."nameL", $1."nameF", $1."nameM",
$1."suffix");
$$;
CREATE OR REPLACE FUNCTION "searchName"("nameL" "LastNameT",
"nameF" "FirstNameT",
"nameM" "MiddleNameT",
"suffix" "NameSuffixT")
RETURNS "SearchNameT"
LANGUAGE sql
IMMUTABLE
AS $$
select regexp_replace(upper(
$1
|| case when $2 is not null or $3 is not null or $4 is not null
then ',' || coalesce($2, '') || coalesce($3, '')
|| coalesce($4, '')
else ''
end),
'[^A-Z0-9\,]', '', 'g')::"SearchNameT"
$$
And there is an index on "Party":
"Party_SearchName" btree ("searchName"("Party".*))
First off, is there much chance that this is fixed between 9.0.4 and
9.0.6? If not, what do people feel would be the most useful
information for diagnosing the problem?
-Kevin
Attachments:bt1.txt (text/plain, 8.2K) download
#0 ResourceOwnerRememberCatCacheRef (owner=0x60817c0, tuple=0x2b411e635100) at resowner.c:631
#1 0x000000000068cb08 in SearchCatCache (cache=0xa66fb0, v1=<value optimized out>, v2=140735859649264, v3=<value optimized out>, v4=<value optimized out>) at catcache.c:1149
#2 0x00000000004ac453 in pg_proc_aclmask (proc_oid=509825280, roleid=16397, mask=128, how=ACLMASK_ANY) at aclchk.c:3556
#3 0x00000000004ac55e in pg_proc_aclcheck (proc_oid=101193664, roleid=509825280, mode=0) at aclchk.c:4133
#4 0x000000000054292d in init_fcache (foid=1258, fcache=0x6467af0, fcacheCxt=0x5fc26c0, needDescForSets=1 '\001') at execQual.c:1176
#5 0x00000000005441cc in ExecEvalOper (fcache=0x2b411e635100, econtext=0x6464170, isNull=0x7fff9eebf0f0 "\002", isDone=0x7fff9eebed54) at execQual.c:2280
#6 0x000000000054123c in ExecEvalFuncArgs (fcinfo=0x7fff9eebedb0, argList=<value optimized out>, econtext=0x6464170) at execQual.c:1358
#7 0x0000000000543ed0 in ExecMakeFunctionResult (fcache=0x64672e0, econtext=0x6464170, isNull=0x7fff9eebf5d0 "\002", isDone=0x7fff9eebf234) at execQual.c:1605
#8 0x000000000054123c in ExecEvalFuncArgs (fcinfo=0x7fff9eebf290, argList=<value optimized out>, econtext=0x6464170) at execQual.c:1358
#9 0x0000000000543ed0 in ExecMakeFunctionResult (fcache=0x6466ad0, econtext=0x6464170, isNull=0x7fff9eebfab1 "", isDone=0x7fff9eebf714) at execQual.c:1605
#10 0x000000000054123c in ExecEvalFuncArgs (fcinfo=0x7fff9eebf770, argList=<value optimized out>, econtext=0x6464170) at execQual.c:1358
#11 0x0000000000543ed0 in ExecMakeFunctionResult (fcache=0x6465f60, econtext=0x6464170, isNull=0x7fff9eebff90 "\002", isDone=0x7fff9eebfbf4) at execQual.c:1605
#12 0x000000000054123c in ExecEvalFuncArgs (fcinfo=0x7fff9eebfc50, argList=<value optimized out>, econtext=0x6464170) at execQual.c:1358
#13 0x0000000000543ed0 in ExecMakeFunctionResult (fcache=0x64653d0, econtext=0x6464170, isNull=0x7fff9eec0470 "\002", isDone=0x7fff9eec00d4) at execQual.c:1605
#14 0x000000000054123c in ExecEvalFuncArgs (fcinfo=0x7fff9eec0130, argList=<value optimized out>, econtext=0x6464170) at execQual.c:1358
#15 0x0000000000543ed0 in ExecMakeFunctionResult (fcache=0x6464bc0, econtext=0x6464170, isNull=0x7fff9eec0950 "\002", isDone=0x7fff9eec05b4) at execQual.c:1605
#16 0x000000000054123c in ExecEvalFuncArgs (fcinfo=0x7fff9eec0610, argList=<value optimized out>, econtext=0x6464170) at execQual.c:1358
#17 0x0000000000543ed0 in ExecMakeFunctionResult (fcache=0x64643b0, econtext=0x6464170, isNull=0x646c078 "", isDone=0x646c0d0) at execQual.c:1605
#18 0x000000000054559d in ExecEvalCoerceToDomain (cstate=0x6464360, econtext=0x2b411e635100, isNull=0x0, isDone=0xa6c6a8) at execQual.c:3765
#19 0x0000000000540fb7 in ExecProject (projInfo=<value optimized out>, isDone=0x7fff9eec0b5c) at execQual.c:5089
#20 0x0000000000555403 in ExecResult (node=0x6464060) at nodeResult.c:155
#21 0x00000000005409a6 in ExecProcNode (node=0x6464060) at execProcnode.c:355
#22 0x000000000053f891 in standard_ExecutorRun (queryDesc=0x645be80, direction=509825280, count=1) at execMain.c:1188
#23 0x000000000054a656 in fmgr_sql (fcinfo=0x7fff9eec0e60) at functions.c:475
#24 0x00000000006a2f05 in fmgr_security_definer (fcinfo=0x60817c0) at fmgr.c:957
#25 0x0000000000544047 in ExecMakeFunctionResult (fcache=0x6454320, econtext=0x6454130, isNull=0x6454f58 "", isDone=0x6455070) at execQual.c:1827
#26 0x0000000000540fb7 in ExecProject (projInfo=<value optimized out>, isDone=0x7fff9eec134c) at execQual.c:5089
#27 0x0000000000555403 in ExecResult (node=0x6454020) at nodeResult.c:155
#28 0x00000000005409a6 in ExecProcNode (node=0x6454020) at execProcnode.c:355
#29 0x000000000053f891 in standard_ExecutorRun (queryDesc=0x2b4121c908a0, direction=509825280, count=1) at execMain.c:1188
#30 0x000000000054a656 in fmgr_sql (fcinfo=0x7fff9eec1640) at functions.c:475
#31 0x00000000006a2f05 in fmgr_security_definer (fcinfo=0x60817c0) at fmgr.c:957
#32 0x0000000000545ef0 in ExecMakeFunctionResultNoSets (fcache=0x2b4121c6d1b0, econtext=0x2b4121c6a2c8, isNull=0x7fff9eec1dc0 "", isDone=<value optimized out>)
at execQual.c:1894
#33 0x0000000000545e6c in ExecMakeFunctionResultNoSets (fcache=0x2b4121c6c970, econtext=0x2b4121c6a2c8, isNull=0x7fff9eec1ebf "", isDone=<value optimized out>)
#34 0x0000000000545f8f in ExecQual (qual=<value optimized out>, econtext=0x2b4121c6a2c8, resultForNull=0 '\0') at execQual.c:4991
#35 0x00000000005476ef in ExecScan (node=0x2b4121c6a1b8, accessMtd=0x5511a0 <IndexNext>, recheckMtd=0x551150 <IndexRecheck>) at execScan.c:192
#36 0x00000000005409ea in ExecProcNode (node=0x2b4121c6a1b8) at execProcnode.c:382
#37 0x0000000000554935 in ExecNestLoop (node=0x2b4121c66088) at nodeNestloop.c:154
#38 0x0000000000540a6a in ExecProcNode (node=0x2b4121c66088) at execProcnode.c:419
#39 0x0000000000554935 in ExecNestLoop (node=0x2b4121c5a180) at nodeNestloop.c:154
#40 0x0000000000540a6a in ExecProcNode (node=0x2b4121c5a180) at execProcnode.c:419
#41 0x00000000005560bd in ExecSort (node=0x2b4121c59f10) at nodeSort.c:102
#42 0x0000000000540aaa in ExecProcNode (node=0x2b4121c59f10) at execProcnode.c:438
#43 0x0000000000552efa in ExecMergeJoin (node=0x2b4121c39b10) at nodeMergejoin.c:696
#44 0x0000000000540a7a in ExecProcNode (node=0x2b4121c39b10) at execProcnode.c:423
#45 0x000000000054b2ed in ExecAppend (node=0x6388db0) at nodeAppend.c:209
#46 0x00000000005409c0 in ExecProcNode (node=0x6388db0) at execProcnode.c:363
#47 0x000000000054c5d8 in ExecAgg (node=0x62d1610) at nodeAgg.c:1227
#48 0x0000000000540aca in ExecProcNode (node=0x62d1610) at execProcnode.c:446
#49 0x00000000005560bd in ExecSort (node=0x62d13a0) at nodeSort.c:102
#50 0x0000000000540aaa in ExecProcNode (node=0x62d13a0) at execProcnode.c:438
#51 0x000000000053f891 in standard_ExecutorRun (queryDesc=0x6350740, direction=509825280, count=40) at execMain.c:1188
#52 0x00000000005efcf4 in PortalRunSelect (portal=0xae6f80, forward=<value optimized out>, count=40, dest=0x9d8f60) at pquery.c:954
#53 0x00000000005f11c3 in PortalRun (portal=0xae6f80, count=40, isTopLevel=1 '\001', dest=0x9d8f60, altdest=0x9d8f60, completionTag=0x7fff9eec2950 "") at pquery.c:798
#54 0x00000000005ee96b in PostgresMain (argc=<value optimized out>, argv=<value optimized out>, username=<value optimized out>) at postgres.c:2003
#55 0x00000000005bec4c in ServerLoop () at postmaster.c:3555
#56 0x00000000005bf847 in PostmasterMain (argc=3, argv=0x9d24f0) at postmaster.c:1092
#57 0x0000000000569cee in main (argc=3, argv=0x9d24f0) at main.c:188
bt2.txt (text/plain, 5.4K) download
#0 0x00000000006b5bff in AllocSetAlloc (context=0x6bb1d30, size=16) at aset.c:637
#1 0x000000000056cb22 in new_list (type=T_List) at list.c:68
#2 0x000000000056cf11 in lappend (list=0x0, datum=0x6d5b300) at list.c:133
#3 0x0000000000541dc1 in ExecInitExpr (node=0x6d4e460, parent=0x6d57870) at execQual.c:4870
#4 0x00000000005417de in ExecInitExpr (node=0x6d4e610, parent=0x6d57870) at execQual.c:4365
#5 0x0000000000541db6 in ExecInitExpr (node=0x6d4e680, parent=0x6d57870) at execQual.c:4870
#6 0x00000000005417de in ExecInitExpr (node=0x6d4e830, parent=0x6d57870) at execQual.c:4365
#7 0x00000000005421d0 in ExecInitExpr (node=0x6d4e930, parent=0x6d57870) at execQual.c:4552
#8 0x0000000000541db6 in ExecInitExpr (node=0x6d4dfe0, parent=0x6d57870) at execQual.c:4870
#9 0x00000000005417de in ExecInitExpr (node=0x6d4e9a0, parent=0x6d57870) at execQual.c:4365
#10 0x0000000000541db6 in ExecInitExpr (node=0x6d4ea10, parent=0x6d57870) at execQual.c:4870
#11 0x00000000005417de in ExecInitExpr (node=0x6d4ea40, parent=0x6d57870) at execQual.c:4365
#12 0x0000000000541db6 in ExecInitExpr (node=0x6d4eab0, parent=0x6d57870) at execQual.c:4870
#13 0x00000000005417de in ExecInitExpr (node=0x6d4ebd0, parent=0x6d57870) at execQual.c:4365
#14 0x0000000000541db6 in ExecInitExpr (node=0x6d4ec40, parent=0x6d57870) at execQual.c:4870
#15 0x00000000005417de in ExecInitExpr (node=0x6d4ed10, parent=0x6d57870) at execQual.c:4365
#16 0x0000000000541b28 in ExecInitExpr (node=0x6d4df30, parent=0x6d57870) at execQual.c:4844
#17 0x0000000000541a65 in ExecInitExpr (node=0x6d4dee0, parent=0x6d57870) at execQual.c:4859
#18 0x0000000000541db6 in ExecInitExpr (node=0x6d4ed80, parent=0x6d57870) at execQual.c:4870
#19 0x00000000005552ae in ExecInitResult (node=0x6d4ee00, estate=0x6d57760, eflags=0) at nodeResult.c:241
#20 0x0000000000540c09 in ExecInitNode (node=0x6bb1d30, estate=0x6d57760, eflags=0) at execProcnode.c:147
#21 0x000000000053fdeb in standard_ExecutorStart (queryDesc=0x6d4f690, eflags=0) at execMain.c:795
#22 0x000000000054a5b6 in fmgr_sql (fcinfo=0x7fff9eec0df0) at functions.c:441
#23 0x00000000006a2f05 in fmgr_security_definer (fcinfo=0x6bb1d30) at fmgr.c:957
#24 0x0000000000544047 in ExecMakeFunctionResult (fcache=0x6d47b30, econtext=0x6d47940, isNull=0x6d48768 "", isDone=0x6d48880) at execQual.c:1827
#25 0x0000000000540fb7 in ExecProject (projInfo=<value optimized out>, isDone=0x7fff9eec12dc) at execQual.c:5089
#26 0x0000000000555403 in ExecResult (node=0x6d47830) at nodeResult.c:155
#27 0x00000000005409a6 in ExecProcNode (node=0x6d47830) at execProcnode.c:355
#28 0x000000000053f891 in standard_ExecutorRun (queryDesc=0x6c4a040, direction=ForwardScanDirection, count=1) at execMain.c:1188
#29 0x000000000054a656 in fmgr_sql (fcinfo=0x7fff9eec15d0) at functions.c:475
#30 0x00000000006a2f05 in fmgr_security_definer (fcinfo=0x6bb1d30) at fmgr.c:957
#31 0x0000000000545ef0 in ExecMakeFunctionResultNoSets (fcache=0x6bc2fd0, econtext=0x6bc17d0, isNull=0x7fff9eec1d50 "", isDone=<value optimized out>) at execQual.c:1894
#32 0x0000000000545e6c in ExecMakeFunctionResultNoSets (fcache=0x6bc2790, econtext=0x6bc17d0, isNull=0x7fff9eec1e4f "", isDone=<value optimized out>) at execQual.c:1866
#33 0x0000000000545f8f in ExecQual (qual=<value optimized out>, econtext=0x6bc17d0, resultForNull=0 '\0') at execQual.c:4991
#34 0x00000000005476ef in ExecScan (node=0x6bc16c0, accessMtd=0x5511a0 <IndexNext>, recheckMtd=0x551150 <IndexRecheck>) at execScan.c:192
#35 0x00000000005409ea in ExecProcNode (node=0x6bc16c0) at execProcnode.c:382
#36 0x0000000000554935 in ExecNestLoop (node=0x6bb8e40) at nodeNestloop.c:154
#37 0x0000000000540a6a in ExecProcNode (node=0x6bb8e40) at execProcnode.c:419
#38 0x00000000005560bd in ExecSort (node=0x6bb8bd0) at nodeSort.c:102
#39 0x0000000000540aaa in ExecProcNode (node=0x6bb8bd0) at execProcnode.c:438
#40 0x0000000000552efa in ExecMergeJoin (node=0x6bb6c70) at nodeMergejoin.c:696
#41 0x0000000000540a7a in ExecProcNode (node=0x6bb6c70) at execProcnode.c:423
#42 0x00000000005560bd in ExecSort (node=0x6bb6b20) at nodeSort.c:102
#43 0x0000000000540aaa in ExecProcNode (node=0x6bb6b20) at execProcnode.c:438
#44 0x0000000000552efa in ExecMergeJoin (node=0x6b38bf0) at nodeMergejoin.c:696
#45 0x0000000000540a7a in ExecProcNode (node=0x6b38bf0) at execProcnode.c:423
#46 0x000000000054b2ed in ExecAppend (node=0x6b38a10) at nodeAppend.c:209
#47 0x00000000005409c0 in ExecProcNode (node=0x6b38a10) at execProcnode.c:363
#48 0x000000000054c5d8 in ExecAgg (node=0x6b37330) at nodeAgg.c:1227
#49 0x0000000000540aca in ExecProcNode (node=0x6b37330) at execProcnode.c:446
#50 0x00000000005560bd in ExecSort (node=0x6b37090) at nodeSort.c:102
#51 0x0000000000540aaa in ExecProcNode (node=0x6b37090) at execProcnode.c:438
#52 0x000000000053f891 in standard_ExecutorRun (queryDesc=0x6b9f630, direction=ForwardScanDirection, count=40) at execMain.c:1188
#53 0x00000000005efcf4 in PortalRunSelect (portal=0xae6d40, forward=<value optimized out>, count=40, dest=0x9d8f60) at pquery.c:954
#54 0x00000000005f11c3 in PortalRun (portal=0xae6d40, count=40, isTopLevel=1 '\001', dest=0x9d8f60, altdest=0x9d8f60, completionTag=0x7fff9eec2950 "") at pquery.c:798
#55 0x00000000005ee96b in PostgresMain (argc=<value optimized out>, argv=<value optimized out>, username=<value optimized out>) at postgres.c:2003
#56 0x00000000005bec4c in ServerLoop () at postmaster.c:3555
#57 0x00000000005bf847 in PostmasterMain (argc=3, argv=0x9d24f0) at postmaster.c:1092
#58 0x0000000000569cee in main (argc=3, argv=0x9d24f0) at main.c:188
bt3.txt (text/plain, 4.6K) download
#0 0x00002b410c25efb7 in semop () from /lib64/libc.so.6
#1 0x00000000005b4243 in PGSemaphoreLock (sema=0x2b411dc12ac0, interruptOK=0 '\0') at pg_sema.c:420
#2 0x00000000005e6366 in LWLockAcquire (lockid=56, mode=LW_EXCLUSIVE) at lwlock.c:460
#3 0x00000000005e3099 in LockAcquireExtended (locktag=0x7fff9eec0820, lockmode=1, sessionLock=<value optimized out>, dontWait=0 '\0', reportMemoryError=1 '\001') at lock.c:608
#4 0x00000000005e107b in LockRelationOid (relid=2606, lockmode=1) at lmgr.c:79
#5 0x0000000000464d7b in relation_open (relationId=2606, lockmode=-1628698896) at heapam.c:899
#6 0x0000000000464dc3 in heap_open (relationId=196614, lockmode=-1628698896) at heapam.c:1071
#7 0x0000000000531422 in GetDomainConstraints (typeOid=16751) at typecmds.c:2379
#8 0x0000000000541b35 in ExecInitExpr (node=0x6114db0, parent=0x611e6f0) at execQual.c:4845
#9 0x0000000000541a65 in ExecInitExpr (node=0x6114d60, parent=0x611e6f0) at execQual.c:4859
#10 0x0000000000541db6 in ExecInitExpr (node=0x6115c00, parent=0x611e6f0) at execQual.c:4870
#11 0x00000000005552ae in ExecInitResult (node=0x6115c80, estate=0x611e5e0, eflags=0) at nodeResult.c:241
#12 0x0000000000540c09 in ExecInitNode (node=0x30006, estate=0x611e5e0, eflags=1) at execProcnode.c:147
#13 0x000000000053fdeb in standard_ExecutorStart (queryDesc=0x6116510, eflags=0) at execMain.c:795
#14 0x000000000054a5b6 in fmgr_sql (fcinfo=0x7fff9eec0e60) at functions.c:441
#15 0x00000000006a2f05 in fmgr_security_definer (fcinfo=0x30006) at fmgr.c:957
#16 0x0000000000544047 in ExecMakeFunctionResult (fcache=0x610e9b0, econtext=0x610e7c0, isNull=0x610f5e8 "", isDone=0x610f700) at execQual.c:1827
#17 0x0000000000540fb7 in ExecProject (projInfo=<value optimized out>, isDone=0x7fff9eec134c) at execQual.c:5089
#18 0x0000000000555403 in ExecResult (node=0x610e6b0) at nodeResult.c:155
#19 0x00000000005409a6 in ExecProcNode (node=0x610e6b0) at execProcnode.c:355
#20 0x000000000053f891 in standard_ExecutorRun (queryDesc=0x2b41210b1868, direction=-1628698896, count=1) at execMain.c:1188
#21 0x000000000054a656 in fmgr_sql (fcinfo=0x7fff9eec1640) at functions.c:475
#22 0x00000000006a2f05 in fmgr_security_definer (fcinfo=0x30006) at fmgr.c:957
#23 0x0000000000545ef0 in ExecMakeFunctionResultNoSets (fcache=0x600e988, econtext=0x600d288, isNull=0x7fff9eec1dc0 "", isDone=<value optimized out>) at execQual.c:1894
#24 0x0000000000545e6c in ExecMakeFunctionResultNoSets (fcache=0x600e148, econtext=0x600d288, isNull=0x7fff9eec1ebf "", isDone=<value optimized out>) at execQual.c:1866
#25 0x0000000000545f8f in ExecQual (qual=<value optimized out>, econtext=0x600d288, resultForNull=0 '\0') at execQual.c:4991
#26 0x00000000005476ef in ExecScan (node=0x600d178, accessMtd=0x5511a0 <IndexNext>, recheckMtd=0x551150 <IndexRecheck>) at execScan.c:192
#27 0x00000000005409ea in ExecProcNode (node=0x600d178) at execProcnode.c:382
#28 0x0000000000554935 in ExecNestLoop (node=0x6009048) at nodeNestloop.c:154
#29 0x0000000000540a6a in ExecProcNode (node=0x6009048) at execProcnode.c:419
#30 0x0000000000554935 in ExecNestLoop (node=0x6000548) at nodeNestloop.c:154
#31 0x0000000000540a6a in ExecProcNode (node=0x6000548) at execProcnode.c:419
#32 0x00000000005560bd in ExecSort (node=0x60002d8) at nodeSort.c:102
#33 0x0000000000540aaa in ExecProcNode (node=0x60002d8) at execProcnode.c:438
#34 0x0000000000552efa in ExecMergeJoin (node=0x5fdfe88) at nodeMergejoin.c:696
#35 0x0000000000540a7a in ExecProcNode (node=0x5fdfe88) at execProcnode.c:423
#36 0x000000000054b2ed in ExecAppend (node=0x44e68a0) at nodeAppend.c:209
#37 0x00000000005409c0 in ExecProcNode (node=0x44e68a0) at execProcnode.c:363
#38 0x000000000054c5d8 in ExecAgg (node=0x44e51c0) at nodeAgg.c:1227
#39 0x0000000000540aca in ExecProcNode (node=0x44e51c0) at execProcnode.c:446
#40 0x00000000005560bd in ExecSort (node=0x44e4f20) at nodeSort.c:102
#41 0x0000000000540aaa in ExecProcNode (node=0x44e4f20) at execProcnode.c:438
#42 0x000000000053f891 in standard_ExecutorRun (queryDesc=0x5fbfc70, direction=-1628698896, count=40) at execMain.c:1188
#43 0x00000000005efcf4 in PortalRunSelect (portal=0xae6d40, forward=<value optimized out>, count=40, dest=0x9d8f60) at pquery.c:954
#44 0x00000000005f11c3 in PortalRun (portal=0xae6d40, count=40, isTopLevel=1 '\001', dest=0x9d8f60, altdest=0x9d8f60, completionTag=0x7fff9eec2950 "") at pquery.c:798
#45 0x00000000005ee96b in PostgresMain (argc=<value optimized out>, argv=<value optimized out>, username=<value optimized out>) at postgres.c:2003
#46 0x00000000005bec4c in ServerLoop () at postmaster.c:3555
#47 0x00000000005bf847 in PostmasterMain (argc=3, argv=0x9d24f0) at postmaster.c:1092
#48 0x0000000000569cee in main (argc=3, argv=0x9d24f0) at main.c:188
bt4.txt (text/plain, 5.8K) download
#0 0x00002b410c25efb7 in semop () from /lib64/libc.so.6
#1 0x00000000005b4243 in PGSemaphoreLock (sema=0x2b411dc10910, interruptOK=0 '\0') at pg_sema.c:420
#2 0x00000000005e6366 in LWLockAcquire (lockid=56, mode=LW_EXCLUSIVE) at lwlock.c:460
#3 0x00000000005e1d88 in LockRelease (locktag=0x7fff9eec0520, lockmode=1, sessionLock=<value optimized out>) at lock.c:1445
#4 0x00000000005e0a33 in UnlockRelationId (relid=<value optimized out>, lockmode=-1628699568) at lmgr.c:139
#5 0x0000000000464c47 in relation_close (relation=<value optimized out>, lockmode=1) at heapam.c:1054
#6 0x000000000053166a in GetDomainConstraints (typeOid=1043) at typecmds.c:2459
#7 0x0000000000541b35 in ExecInitExpr (node=0x5131070, parent=0x513a9b0) at execQual.c:4845
#8 0x0000000000541a65 in ExecInitExpr (node=0x5131020, parent=0x513a9b0) at execQual.c:4859
#9 0x0000000000541db6 in ExecInitExpr (node=0x5131ec0, parent=0x513a9b0) at execQual.c:4870
#10 0x00000000005552ae in ExecInitResult (node=0x5131f40, estate=0x513a8a0, eflags=0) at nodeResult.c:241
#11 0x0000000000540c09 in ExecInitNode (node=0x30006, estate=0x513a8a0, eflags=1) at execProcnode.c:147
#12 0x000000000053fdeb in standard_ExecutorStart (queryDesc=0x51327d0, eflags=0) at execMain.c:795
#13 0x000000000054a5b6 in fmgr_sql (fcinfo=0x7fff9eec0b30) at functions.c:441
#14 0x00000000006a2f05 in fmgr_security_definer (fcinfo=0x30006) at fmgr.c:957
#15 0x0000000000544047 in ExecMakeFunctionResult (fcache=0x512ac70, econtext=0x512aa80, isNull=0x512b8a8 "", isDone=0x512b9c0) at execQual.c:1827
#16 0x0000000000540fb7 in ExecProject (projInfo=<value optimized out>, isDone=0x7fff9eec101c) at execQual.c:5089
#17 0x0000000000555403 in ExecResult (node=0x512a970) at nodeResult.c:155
#18 0x00000000005409a6 in ExecProcNode (node=0x512a970) at execProcnode.c:355
#19 0x000000000053f891 in standard_ExecutorRun (queryDesc=0x2b4121b11280, direction=-1628699568, count=1) at execMain.c:1188
#20 0x000000000054a656 in fmgr_sql (fcinfo=0x7fff9eec1310) at functions.c:475
#21 0x00000000006a2f05 in fmgr_security_definer (fcinfo=0x30006) at fmgr.c:957
#22 0x0000000000545ef0 in ExecMakeFunctionResultNoSets (fcache=0x2b4121aa2b98, econtext=0x2b4121aa1798, isNull=0x7fff9eec1a90 "", isDone=<value optimized out>) at execQual.c:1894
#23 0x0000000000545e6c in ExecMakeFunctionResultNoSets (fcache=0x2b4121aa2358, econtext=0x2b4121aa1798, isNull=0x7fff9eec1b8f "", isDone=<value optimized out>) at execQual.c:1866
#24 0x0000000000545f8f in ExecQual (qual=<value optimized out>, econtext=0x2b4121aa1798, resultForNull=0 '\0') at execQual.c:4991
#25 0x00000000005476ef in ExecScan (node=0x2b4121aa1688, accessMtd=0x5511a0 <IndexNext>, recheckMtd=0x551150 <IndexRecheck>) at execScan.c:192
#26 0x00000000005409ea in ExecProcNode (node=0x2b4121aa1688) at execProcnode.c:382
#27 0x0000000000554935 in ExecNestLoop (node=0x2b4121a9dea0) at nodeNestloop.c:154
#28 0x0000000000540a6a in ExecProcNode (node=0x2b4121a9dea0) at execProcnode.c:419
#29 0x0000000000554935 in ExecNestLoop (node=0x2b4121a97000) at nodeNestloop.c:154
#30 0x0000000000540a6a in ExecProcNode (node=0x2b4121a97000) at execProcnode.c:419
#31 0x00000000005560bd in ExecSort (node=0x2b4121a96d90) at nodeSort.c:102
#32 0x0000000000540aaa in ExecProcNode (node=0x2b4121a96d90) at execProcnode.c:438
#33 0x0000000000552efa in ExecMergeJoin (node=0x2b4121a950b0) at nodeMergejoin.c:696
#34 0x0000000000540a7a in ExecProcNode (node=0x2b4121a950b0) at execProcnode.c:423
#35 0x0000000000552efa in ExecMergeJoin (node=0x2b4121a932d0) at nodeMergejoin.c:696
#36 0x0000000000540a7a in ExecProcNode (node=0x2b4121a932d0) at execProcnode.c:423
#37 0x00000000005560bd in ExecSort (node=0x2b4121a93060) at nodeSort.c:102
#38 0x0000000000540aaa in ExecProcNode (node=0x2b4121a93060) at execProcnode.c:438
#39 0x0000000000552efa in ExecMergeJoin (node=0x2b4121a91c10) at nodeMergejoin.c:696
#40 0x0000000000540a7a in ExecProcNode (node=0x2b4121a91c10) at execProcnode.c:423
#41 0x0000000000554a1f in ExecNestLoop (node=0x2b4121a908a0) at nodeNestloop.c:120
#42 0x0000000000540a6a in ExecProcNode (node=0x2b4121a908a0) at execProcnode.c:419
#43 0x00000000005560bd in ExecSort (node=0x2b4121a90630) at nodeSort.c:102
#44 0x0000000000540aaa in ExecProcNode (node=0x2b4121a90630) at execProcnode.c:438
#45 0x0000000000552efa in ExecMergeJoin (node=0x2b4121a72b68) at nodeMergejoin.c:696
#46 0x0000000000540a7a in ExecProcNode (node=0x2b4121a72b68) at execProcnode.c:423
#47 0x00000000005476ae in ExecScan (node=0x2b4121a71198, accessMtd=0x558830 <SubqueryNext>, recheckMtd=0x5586c0 <SubqueryRecheck>) at execScan.c:82
#48 0x0000000000540a1a in ExecProcNode (node=0x2b4121a71198) at execProcnode.c:396
#49 0x000000000054b2ed in ExecAppend (node=0x2b4121949b38) at nodeAppend.c:209
#50 0x00000000005409c0 in ExecProcNode (node=0x2b4121949b38) at execProcnode.c:363
#51 0x000000000054c5d8 in ExecAgg (node=0x2b4121947f08) at nodeAgg.c:1227
#52 0x0000000000540aca in ExecProcNode (node=0x2b4121947f08) at execProcnode.c:446
#53 0x00000000005560bd in ExecSort (node=0x2b4121947c98) at nodeSort.c:102
#54 0x0000000000540aaa in ExecProcNode (node=0x2b4121947c98) at execProcnode.c:438
#55 0x000000000053f891 in standard_ExecutorRun (queryDesc=0x1ba3c28, direction=-1628699568, count=40) at execMain.c:1188
#56 0x00000000005efcf4 in PortalRunSelect (portal=0xae7100, forward=<value optimized out>, count=40, dest=0x9d8f60) at pquery.c:954
#57 0x00000000005f11c3 in PortalRun (portal=0xae7100, count=40, isTopLevel=1 '\001', dest=0x9d8f60, altdest=0x9d8f60, completionTag=0x7fff9eec2950 "") at pquery.c:798
#58 0x00000000005ee96b in PostgresMain (argc=<value optimized out>, argv=<value optimized out>, username=<value optimized out>) at postgres.c:2003
#59 0x00000000005bec4c in ServerLoop () at postmaster.c:3555
#60 0x00000000005bf847 in PostmasterMain (argc=3, argv=0x9d24f0) at postmaster.c:1092
#61 0x0000000000569cee in main (argc=3, argv=0x9d24f0) at main.c:188
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: Kevin.Grittner@wicourts.gov
Subject: Re: Security definer "generated column" function used in index
In-Reply-To: <4EE203C20200002500043B7D@gw.wicourts.gov>
References: <4EE203C20200002500043B7D@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox