Hi all, While doing some tests with jsonb, I found a failure as told in $subject: =# create table data_jsonb (data jsonb); CREATE TABLE =# insert into data_jsonb ... tuple in the script attached INSERT 1 =# create index data_index on data_jsonb using gin(data); ERROR: 54000: index row size 1808 exceeds maximum 1352 for index "data_index" LOCATION: GinFormTuple, ginentrypage.c:110 =# create index data_index2 on data_jsonb using gin (data jsonb_hash_ops); CREATE INDEX
The data creating the failure is a tuple in a dump of geonames (http://www.geonames.org/export/), listing some geographical data, and it is caused by some arabic characters it seems used to provide translations for a given geographical location. Encoding of the database on which I have done the tests is UTF-8. Japanese, Chinese equivalents were working fine btw with this operator. 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 A test case is attached, note as well that only the default gin operator class is failing, jsonb_hash_ops worked well. Regards, -- Michael
jsonb_index_error.sql
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers