Hi Tom,
On Tue, 31 Jan 2023 at 05:43, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Make Vars be outer-join-aware.
>
Since this commit, my test setup is triggering asserts every few minutes.
The repro SQL itself doesn't make much sense, but it's the smallest I could
narrow it down to:
create table t1(a int);
create table t2(a int);
SELECT table_catalog AS c2
FROM public.t1
INNER JOIN (t2
LEFT JOIN information_schema.column_udt_usage ON NULL)
ON NULL;
Sample backtrace (can provide full backtrace if it helps):
Core was generated by `postgres: 8c1cd726c5@master@sqith: u76 postgres
127.0.0.1(55412) SELECT '.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007f4e32fbf859 in __GI_abort () at abort.c:79
#2 0x000055bc9fb256bf in ExceptionalCondition (
conditionName=0x55bc9fcdaaf1 "phv->phnullingrels == NULL",
fileName=0x55bc9fcda72f "setrefs.c", lineNumber=2208) at assert.c:66
#3 0x000055bc9f8147a4 in fix_scan_expr_mutator (node=0x55bca21c78b0,
context=0x7fff72760960) at setrefs.c:2208
#4 0x000055bc9f768081 in expression_tree_mutator_impl (node=0x55bca21c9dc0,
mutator=0x55bc9f8144a2 <fix_scan_expr_mutator>, context=0x7fff72760960)
at nodeFuncs.c:3051
#5 0x000055bc9f81482c in fix_scan_expr_mutator (node=0x55bca21c9dc0,
context=0x7fff72760960) at setrefs.c:2217
#6 0x000055bc9f76848c in expression_tree_mutator_impl (node=0x55bca21c9e10,
mutator=0x55bc9f8144a2 <fix_scan_expr_mutator>, context=0x7fff72760960)
at nodeFuncs.c:3137
#7 0x000055bc9f81482c in fix_scan_expr_mutator (node=0x55bca21c9e10,
context=0x7fff72760960) at setrefs.c:2217
#8 0x000055bc9f814473 in fix_scan_expr (root=0x55bca217e358,
node=0x55bca21c9e10, rtoffset=1, num_exec=0) at setrefs.c:2127
TRAP: failed Assert("phv->phnullingrels == NULL"), File: "setrefs.c",
Line: 2208, PID: 1045580
Thanks to SQLSmith / SQLReduce for help on this.
-
Robins Tharakan
Amazon Web Services