pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jon Nelson <jnelson+pgsql@jamponi.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: unexpected query failure: ERROR: GIN indexes do not support whole-index scans
Date: Mon, 18 Oct 2010 19:01:10 -0400
Message-ID: <27387.1287442870@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTi=KzCrUTqZa_zXa8-T8afGbc9OCgAn7Ex2emnyQ@mail.gmail.com>
References: <AANLkTi=KzCrUTqZa_zXa8-T8afGbc9OCgAn7Ex2emnyQ@mail.gmail.com>

Jon Nelson <jnelson+pgsql@jamponi.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



view thread (3+ messages)  latest in thread

Message-ID: <27387.1287442870@sss.pgh.pa.us>
Permalink:  ../27387.1287442870@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27387.1287442870@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jnelson+pgsql@jamponi.net
  Subject: Re: unexpected query failure: ERROR: GIN indexes do not support whole-index scans
  In-Reply-To: <27387.1287442870@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox