Re: [HACKERS] [COMMITTERS] pgsql: Clean up jsonb code.

2014-05-12 Thread Heikki Linnakangas
On 05/10/2014 01:32 AM, Tom Lane wrote: Peter Geoghegan p...@heroku.com writes: On Fri, May 9, 2014 at 2:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: However, what it looks to me like we've got here is a very bad reimplementation of StringInfo buffers. There is for example no integer-overflow

Re: [HACKERS] [COMMITTERS] pgsql: Clean up jsonb code.

2014-05-09 Thread Alexander Korotkov
On Thu, May 8, 2014 at 11:45 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 05/08/2014 02:25 AM, Peter Geoghegan wrote: findJsonbValueFromSuperHeader()'s lowbound argument previously served to establish a low bound for searching when searching for multiple keys (so the second and

Re: [HACKERS] [COMMITTERS] pgsql: Clean up jsonb code.

2014-05-09 Thread Peter Geoghegan
On Fri, May 9, 2014 at 10:27 AM, Alexander Korotkov aekorot...@gmail.com wrote: With current head I can't load delicious dataset into jsonb format. I got segfault. It looks like memory corruption. I'll look at this within the next couple of hours. -- Peter Geoghegan -- Sent via

Re: [HACKERS] [COMMITTERS] pgsql: Clean up jsonb code.

2014-05-09 Thread Tom Lane
Alexander Korotkov aekorot...@gmail.com writes: With current head I can't load delicious dataset into jsonb format. I got segfault. It looks like memory corruption. The proximate cause of this seems to be that reserveFromBuffer() fails to consider the possibility that it needs to

Re: [HACKERS] [COMMITTERS] pgsql: Clean up jsonb code.

2014-05-09 Thread Peter Geoghegan
On Fri, May 9, 2014 at 2:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: However, what it looks to me like we've got here is a very bad reimplementation of StringInfo buffers. There is for example no integer-overflow checking here. Rather than try to bring this code up to speed, I think we should

Re: [HACKERS] [COMMITTERS] pgsql: Clean up jsonb code.

2014-05-09 Thread Tom Lane
Peter Geoghegan p...@heroku.com writes: On Fri, May 9, 2014 at 2:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: However, what it looks to me like we've got here is a very bad reimplementation of StringInfo buffers. There is for example no integer-overflow checking here. Rather than try to bring

Re: [HACKERS] [COMMITTERS] pgsql: Clean up jsonb code.

2014-05-08 Thread Heikki Linnakangas
On 05/08/2014 02:25 AM, Peter Geoghegan wrote: findJsonbValueFromSuperHeader()'s lowbound argument previously served to establish a low bound for searching when searching for multiple keys (so the second and subsequent user-supplied key could skip much of the object). Got that. In the case