Re: [sqlsmith] Failed assertion in joinrels.c

From: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andreas Seltenreich <seltenreich(at)gmx(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
Date: 2015-08-02 07:59:36
Message-ID: BLU436-SMTP121548815908D3CF56F631BF2880@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/01/2015 05:59 PM, Tom Lane wrote:
> Well, I certainly think all of these represent bugs:
>

>> 1 | ERROR: could not find pathkey item to sort

sqlsmith was able to find these two queries that trigger the error on my
machine:

ERROR: could not find pathkey item to sort
STATEMENT: select
rel_16564180.id1 as c0
from
public.bprime as rel_16564178
left join (select
rel_16564179.b as c0,
rel_16564179.c as c1
from
public.clstr_tst as rel_16564179
where rel_16564179.c < rel_16564179.d) as subq_2610919
inner join public.num_result as rel_16564180
on (subq_2610919.c0 = rel_16564180.id1 )
on (rel_16564178.thousand = subq_2610919.c0 )
where subq_2610919.c1 = subq_2610919.c1
fetch first 122 rows only;

STATEMENT: select
subq_1991714.c0 as c0,
subq_1991712.c0 as c1,
rel_12624817.a as c2
from
(select
rel_12624653.id2 as c0,
rel_12624653.id2 as c1
from
public.num_exp_add as rel_12624653
where rel_12624653.expected >= rel_12624653.expected
fetch first 137 rows only) as subq_1991697
inner join (select
rel_12624805.z as c0
from
public.insert_tbl as rel_12624805
where rel_12624805.y <= rel_12624805.y
fetch first 108 rows only) as subq_1991712
left join public.clstr_tst as rel_12624817
left join public.main_table as rel_12624818
on (rel_12624817.b = rel_12624818.a )
on (subq_1991712.c0 = rel_12624818.a )
on (subq_1991697.c0 = rel_12624818.a ),
lateral (select
rel_12624819.tgdeferrable as c0
from
pg_catalog.pg_trigger as rel_12624819
where (rel_12624819.tgconstraint >= rel_12624819.tgrelid)
and ((rel_12624819.tgconstrindid <= rel_12624819.tgrelid)
or (EXISTS (
select
rel_12624820.grantor as c0,
rel_12624820.grantee as c1,
rel_12624820.is_grantable as c2,
rel_12624820.routine_schema as c3,
rel_12624820.specific_schema as c4,
rel_12624820.grantee as c5,
rel_12624820.routine_catalog as c6,
rel_12624820.routine_schema as c7,
rel_12624820.specific_name as c8
from
information_schema.role_routine_grants as
rel_12624820
where 22 >= 29
fetch first 138 rows only)))
fetch first 93 rows only) as subq_1991714
where rel_12624817.d = rel_12624817.c
fetch first 97 rows only;

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-08-02 08:39:28 Re: [sqlsmith] Failed assertion in joinrels.c
Previous Message Kouhei Kaigai 2015-08-02 02:36:24 Re: Parallel Seq Scan