From: Andres Freund <andres@anarazel.de>
To: Martin Atukunda <matlads@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist
Date: Sun, 5 Dec 2010 13:29:35 +0100
Message-ID: <201012051329.35665.andres@anarazel.de> (raw)
In-Reply-To: <AANLkTikSHA0CvwZsQLNFUXCBVELEmXG_bPCqTnHqwXEN@mail.gmail.com>
References: <201012050650.oB56opvM090787@wwwmaster.postgresql.org>
<201012051239.23510.andres@anarazel.de>
<AANLkTikSHA0CvwZsQLNFUXCBVELEmXG_bPCqTnHqwXEN@mail.gmail.com>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@anarazel.de, matlads@gmail.com
Subject: Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist
In-Reply-To: <201012051329.35665.andres@anarazel.de>
References: <201012050650.oB56opvM090787@wwwmaster.postgresql.org> <201012051239.23510.andres@anarazel.de> <AANLkTikSHA0CvwZsQLNFUXCBVELEmXG_bPCqTnHqwXEN@mail.gmail.com> <201012051329.35665.andres@anarazel.de>
* 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