Re: jsonb crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: pgsql-hackers(at)postgresql(dot)org, David Rowley <drowley(at)postgresql(dot)org>
Subject: Re: jsonb crash
Date: 2021-09-29 20:00:12
Message-ID: 2998377.1632945612@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> writes:
> I found a crash (segmentation fault) on jsonb.
> This is the best I could do to reduce the query:

> """
> select
> 75 as c1
> from
> public.pagg_tab_ml as ref_0,
> lateral (select
> ref_0.a as c5
> from generate_series(1, 300) as sample_0
> fetch first 78 rows only
> ) as subq_0
> where case when (subq_0.c5 < 2)
> then cast(null as jsonb)
> else cast(null as jsonb)
> end ? ref_0.c
> """

I think this must be a memoize bug. AFAICS, nowhere in this query
can we be processing a non-null JSONB value, so what are we doing
in jsonb_hash? Something down-stack must have lost the information
that the Datum is actually null.

regards, tom lane

In response to

  • jsonb crash at 2021-09-29 18:55:44 from Jaime Casanova

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-09-29 20:11:58 Re: [BUG] failed assertion in EnsurePortalSnapshotExists()
Previous Message Drouvot, Bertrand 2021-09-29 19:53:51 Re: [BUG] failed assertion in EnsurePortalSnapshotExists()