[sqlsmith] Failed assertion in joinrels.c - Mailing list pgsql-hackers

From Andreas Seltenreich
Subject [sqlsmith] Failed assertion in joinrels.c
Date
Msg-id 87wpxfygg9.fsf@credativ.de
Whole thread Raw
Responses Re: [sqlsmith] Failed assertion in joinrels.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [sqlsmith] Failed assertion in joinrels.c  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
Hi,

sqlsmith triggered the following assertion in master (c188204).

TRAP: FailedAssertion("!(!bms_overlap(joinrelids, sjinfo->min_lefthand))", File: "joinrels.c", Line: 500)

As usual, the query is against the regression database.  It is rather
unwieldy… I wonder if I should stop working on new grammar rules and
instead work on some post-processing that prunes the AST as much as
possible while maintaining the failure mode.

regards,
andreas

select subq_647409.c0 as c0, subq_647409.c0 as c1
from public.customer as rel_4116461     left join public.clstr_tst_s as rel_4116555  left join
information_schema.columnsas rel_4116556  on (rel_4116555.rf_a = rel_4116556.ordinal_position )right join
pg_catalog.pg_rolesas rel_4116557on (rel_4116556.maximum_cardinality = rel_4116557.rolconnlimit )     on
(rel_4116461.passwd= rel_4116557.rolpassword )   left join (select    subq_647410.c8 as c0  from    public.char_tbl as
rel_4116611,   lateral (select      rel_4116612.name as c0,      rel_4116612.comment as c1,      rel_4116612.nslots as
c2,     rel_4116612.comment as c3,      rel_4116612.nslots as c4,      rel_4116612.nslots as c5,
rel_4116612.commentas c6,      rel_4116612.comment as c7,      rel_4116612.nslots as c8,      rel_4116612.nslots as c9,
    rel_4116612.nslots as c10    from      public.hub as rel_4116612    where rel_4116612.comment ~>=~
rel_4116612.comment   fetch first 116 rows only) as subq_647410  where (subq_647410.c7 !~~* subq_647410.c7)    or
((subq_647410.c3= subq_647410.c3)      and ((subq_647410.c7 ~* subq_647410.c6)    and (subq_647410.c7 @@
subq_647410.c7))) fetch first 152 rows only) as subq_647409     inner join public.int4_tbl as rel_4116661  inner join
public.shoeas rel_4116662  on (rel_4116661.f1 = rel_4116662.sh_avail )inner join public.rtest_vview3 as rel_4116663on
(rel_4116661.f1= rel_4116663.a )     on (subq_647409.c0 = rel_4116662.sh_avail )   on (rel_4116555.b = rel_4116661.f1 ) 
where ((rel_4116557.rolvaliduntil is NULL)   or (rel_4116663.b !~ rel_4116461.name)) or (rel_4116661.f1 is not NULL)
fetch first 80 rows only;



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 64-bit XIDs again
Next
From: Tom Lane
Date:
Subject: Re: [sqlsmith] Failed assertion in joinrels.c