Re: Default gin operator class of jsonb failing with index row size maximum reached - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Default gin operator class of jsonb failing with index row size maximum reached
Date
Msg-id CAM3SWZTb+JU8faFpY4Qg0XzHmU4MqYqr0nh2AyYPON68yqaJeg@mail.gmail.com
Whole thread Raw
In response to Default gin operator class of jsonb failing with index row size maximum reached  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Default gin operator class of jsonb failing with index row size maximum reached  (Oleg Bartunov <obartunov@gmail.com>)
List pgsql-hackers
On Mon, Apr 7, 2014 at 8:29 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> Documentation of jsonb tells that jsonb documents should be kept at a
> reasonable size to reduce lock contention, but there is no mention of
> size limitation for indexes:
> http://www.postgresql.org/docs/devel/static/datatype-json.html

It seems like your complaint is that this warrants special
consideration from the jsonb docs, due to this general limitation
being particularly likely to affect jsonb users. Is that accurate?

The structure of the JSON in your test case is quite atypical, since
there is one huge string containing each of the translations, rather
than a bunch of individual array elements (one per translation) or a
bunch of object pairs.

As it happens, just this morning I read that MongoDB's new version 2.6
now comes with stricter enforcement of key length:
http://docs.mongodb.org/master/release-notes/2.6-compatibility/#index-key-length-incompatibility
. While previous versions just silently failed to index values that
were inserted, there is now a 1024 limit imposed on the total size of
indexed values.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: ipc_test
Next
From: Peter Geoghegan
Date:
Subject: Re: B-Tree support function number 3 (strxfrm() optimization)