Re: unexpected query failure: ERROR: GIN indexes do not support whole-index scans

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: unexpected query failure: ERROR: GIN indexes do not support whole-index scans
Date: 2010-10-18 23:01:10
Message-ID: 27387.1287442870@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jon Nelson <jnelson+pgsql(at)jamponi(dot)net> writes:
> CREATE INDEX foo_idx ON t USING GIN (alternatecodes) WHERE
> alternatecodes IS NOT NULL;
> SELECT * FROM t WHERE alternatecodes IS NOT NULL;
> ERROR: GIN indexes do not support whole-index scans

Yep, this is a known issue. It's going to take major surgery on GIN to
fix it, so don't hold your breath. In the particular case, what good do
you think the WHERE clause is doing anyway? GIN won't index nulls at
all ... which indeed is an aspect of the underlying issue --- see recent
discussions, eg here:
http://archives.postgresql.org/pgsql-hackers/2010-10/msg00521.php

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Carey 2010-10-19 01:40:11 HashJoin order, hash the large or small table? Postgres likes to hash the big one, why?
Previous Message Jon Nelson 2010-10-18 20:59:26 unexpected query failure: ERROR: GIN indexes do not support whole-index scans