Re: Brain fade in gin_extract_jsonb_path()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, sdiz(at)sdiz(dot)net
Subject: Re: Brain fade in gin_extract_jsonb_path()
Date: 2015-11-05 23:21:31
Message-ID: 22335.1446765691@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> I think the easiest way to fix this is to forget about the special
> initialization at outer level and just always initialize a new stack level
> to have the same hash as its parent. That leads to the first patch below
> --- but once you look at that, you realize that we've got unnecessarily
> many copies of stack->parent->hash into stack->hash, so what I actually
> propose now is the second patch below.

Meh, that wasn't quite right either --- need to reset stack->hash after
processing a sub-object, not only after a scalar VALUE. I think what I
committed is OK though.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2015-11-05 23:50:16 Re: GIN data corruption bug(s) in 9.6devel
Previous Message Haribabu Kommi 2015-11-05 23:08:59 Re: NOTIFY in Background Worker