[GENERAL] gin index trouble - Mailing list pgsql-general

From Rob Sargent
Subject [GENERAL] gin index trouble
Date
Msg-id A5C88C48-4573-453B-BF52-3B34A97D7A0A@xmission.com
Whole thread Raw
Responses Re: [GENERAL] gin index trouble  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [GENERAL] gin index trouble  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-general
I’ve hit this same message 
Caused by: org.postgresql.util.PSQLException: ERROR: right sibling of GIN page is of different type
in a couple of contexts and I’m starting to get worried. 
  • I’ve rebuilt the index, but will that help? 
  • Is there a way to see what the ‘different type’ is? 
  • Is it caught/clean-up by vacuum analyse or some such?

I’ve had good results using “<@" and “@>” and believe I've defended the use of an array, but I can’t loose three days worth of simulations to this dang wrong sibling.

select version(); — will use production release of 10 next week.
                                                  version                                                   
------------------------------------------------------------------------------------------------------------
 PostgreSQL 10beta3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11), 64-bit


The only gin index I have is in this table definition:
\d sui.probandset
           Table "sui.probandset"
   Column    |       Type       | Modifiers 
-------------+------------------+-----------
 id          | uuid             | not null
 name        | text             | 
 probands    | uuid[]           | not null
 meioses     | integer          | 
 min_kincoef | double precision | 
 max_kincoef | double precision | 
 people_id   | uuid             | not null
Indexes:
    "probandset_pkey" PRIMARY KEY, btree (id)
    "probandsetunique" gin (probands)
Check constraints:
    "sortedset" CHECK (issorteduuids(probands))
Foreign-key constraints:
    "probandset_people_id_fkey" FOREIGN KEY (people_id) REFERENCES base.people(id)
Referenced by:
    TABLE "sui.probandset_group_member" CONSTRAINT "probandset_group_member_member_id_fkey" FOREIGN KEY (member_id) REFERENCES sui.probandset(id)
    TABLE "sui.segment" CONSTRAINT "segment_probandset_id_fkey" FOREIGN KEY (probandset_id) REFERENCES sui.probandset(id)

and I um, er, enabled gin on uuid by copying from a thread in this list, as follows:
create operator class _uuid_ops
default for type _uuid
using gin as
operator 1 &&(anyarray, anyarray)
,operator 2 @>(anyarray, anyarray)
,operator 3 <@(anyarray, anyarray)
,operator 4 =(anyarray, anyarray)
,function 1 uuid_cmp(uuid, uuid)
,function 2 ginarrayextract(anyarray, internal, internal)
,function 3 ginqueryarrayextract(anyarray, internal, smallint, internal, internal, internal, internal)
,function 4 ginarrayconsistent(internal, smallint, anyarray, integer, internal, internal, internal, internal)
,storage uuid;

pgsql-general by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: [GENERAL] Why does a SELECT query cause "dirtied" buffers?
Next
From: Jeff Janes
Date:
Subject: Re: [GENERAL] Where to find development builds of pg for windows