Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist

From: Andres Freund <andres(at)anarazel(dot)de>
To: Martin Atukunda <matlads(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist
Date: 2010-12-05 12:29:35
Message-ID: 201012051329.35665.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sunday 05 December 2010 13:07:23 Martin Atukunda wrote:
> > Due to the wonders of MVCC the old row is still available in the heap.
> > Best read the docs about what MVCC means. And as pg's indexes don't care
> > about visibility it will still try to index the "old" row.
>
> Thanks andreas,
>
> so, basically, the only way out of this would be to:
>
> 1. copy out all the rows
> 2. truncate the Tables
> 3. then create the index
> 4. copy in the rows
Something like:

ALTER TABLE t ALTER apps TYPE text[];
ALTER TABLE t ALTER apps TYPE bigint[] USING apps::bigint[];

could work.

Andres

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2010-12-05 12:58:22 Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist
Previous Message Martin Atukunda 2010-12-05 12:07:23 Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist