On Tue, 4 Sep 2018 at 00:01, Pavan Deolasee <pavan.deola...@gmail.com> wrote:
>
> I've rebased the patch against the current master. The patch hasn't changed 
> much since the last time.
>

Hi Pavan,

I had this crash when running sqlsmith against the previous version of
this patch and just confirmed it still crash with this version (which
makes sense because you said patch hasn't changed much)

To reproduce run this query against regression database:

"""
MERGE INTO public.pagg_tab_ml_p3 as target_0
USING public.prt2_l_p3_p2 as ref_0 ON target_0.a = ref_0.a
WHEN MATCHED AND cast(null as tid) <= cast(null as tid) THEN DELETE;
"""

attached is a backtrace

-- 
Jaime Casanova                      www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f0b496c442a in __GI_abort () at abort.c:89
#2  0x000055e572b2ede4 in ExceptionalCondition (conditionName=0x55e572d09070 
"!(list != ((List *) ((void *)0)))", errorType=0x55e572d08df7 
"FailedAssertion", 
    fileName=0x55e572d08df0 "list.c", lineNumber=390) at assert.c:54
#3  0x000055e572840746 in list_nth_cell (list=0x0, n=1) at list.c:390
#4  0x000055e57284083b in list_nth (list=0x0, n=1) at list.c:413
#5  0x000055e5727d48f1 in adjust_partition_tlist (tlist=0x0, 
map=0x55e5738912f8) at execPartition.c:1448
#6  0x000055e5727d385e in ExecInitPartitionInfo (mtstate=0x55e573857808, 
resultRelInfo=0x55e573857268, proute=0x55e5738768c8, estate=0x55e573857018, 
partidx=0)
    at execPartition.c:765
#7  0x000055e5727cefe3 in ExecMergeMatched (mtstate=0x55e573857808, 
estate=0x55e573857018, slot=0x55e573870ba8, junkfilter=0x55e573877d20, 
tupleid=0x7ffebd80430a)
    at execMerge.c:205
#8  0x000055e5727cee5e in ExecMerge (mtstate=0x55e573857808, 
estate=0x55e573857018, slot=0x55e573870ba8, junkfilter=0x55e573877d20, 
resultRelInfo=0x55e573857268)
    at execMerge.c:127
#9  0x000055e572802f57 in ExecModifyTable (pstate=0x55e573857808) at 
nodeModifyTable.c:2229
#10 0x000055e5727d5d56 in ExecProcNodeFirst (node=0x55e573857808) at 
execProcnode.c:445
#11 0x000055e5727c93b7 in ExecProcNode (node=0x55e573857808) at 
../../../src/include/executor/executor.h:237
#12 0x000055e5727cbdd2 in ExecutePlan (estate=0x55e573857018, 
planstate=0x55e573857808, use_parallel_mode=false, operation=CMD_MERGE, 
sendTuples=false, numberTuples=0, 
    direction=ForwardScanDirection, dest=0x55e573860720, execute_once=true) at 
execMain.c:1725
#13 0x000055e5727c99bf in standard_ExecutorRun (queryDesc=0x55e5737a6258, 
direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:363
#14 0x000055e5727c97d5 in ExecutorRun (queryDesc=0x55e5737a6258, 
direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:306
#15 0x000055e5729c1239 in ProcessQuery (plan=0x55e5738605a8, 
    sourceText=0x55e57377c4c8 "MERGE INTO public.pagg_tab_ml_p3 as target_0 
\nUSING public.prt2_l_p3_p2 as ref_0 ON target_0.a = ref_0.a \nWHEN MATCHED   
AND cast(null as tid) <= cast(null as tid)    THEN DELETE;", params=0x0, 
queryEnv=0x0, dest=0x55e573860720, completionTag=0x7ffebd804780 "") at 
pquery.c:161
#16 0x000055e5729c2c0b in PortalRunMulti (portal=0x55e5737e5b78, 
isTopLevel=true, setHoldSnapshot=false, dest=0x55e573860720, 
altdest=0x55e573860720, 
    completionTag=0x7ffebd804780 "") at pquery.c:1291
#17 0x000055e5729c21c8 in PortalRun (portal=0x55e5737e5b78, 
count=9223372036854775807, isTopLevel=true, run_once=true, dest=0x55e573860720, 
altdest=0x55e573860720, 
    completionTag=0x7ffebd804780 "") at pquery.c:804
#18 0x000055e5729bbd20 in exec_simple_query (
    query_string=0x55e57377c4c8 "MERGE INTO public.pagg_tab_ml_p3 as target_0 
\nUSING public.prt2_l_p3_p2 as ref_0 ON target_0.a = ref_0.a \nWHEN MATCHED   
AND cast(null as tid) <= cast(null as tid)    THEN DELETE;") at postgres.c:1122
#19 0x000055e5729c02ed in PostgresMain (argc=1, argv=0x55e5737ae238, 
dbname=0x55e5737ae098 "regression", username=0x55e5737ae070 "jcasanov") at 
postgres.c:4150
#20 0x000055e572918861 in BackendRun (port=0x55e57379e070) at postmaster.c:4364
#21 0x000055e572917f5a in BackendStartup (port=0x55e57379e070) at 
postmaster.c:4036
#22 0x000055e572914299 in ServerLoop () at postmaster.c:1709
#23 0x000055e572913ac7 in PostmasterMain (argc=3, argv=0x55e573776210) at 
postmaster.c:1382
#24 0x000055e572837605 in main (argc=3, argv=0x55e573776210) at main.c:228

Reply via email to