pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-bugs@postgresql.org
Cc: Martin Atukunda <matlads@gmail.com>
Subject: Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist
Date: Mon, 06 Dec 2010 23:20:46 +0100
Message-ID: <4CFD61BE.7060301@enterprisedb.com> (raw)
In-Reply-To: <26741.1291570005@sss.pgh.pa.us>
References: <201012050650.oB56opvM090787@wwwmaster.postgresql.org>
	<201012051358.22813.andres@anarazel.de>
	<26122.1291567379@sss.pgh.pa.us>
	<201012051806.20719.andres@anarazel.de>
	<26741.1291570005@sss.pgh.pa.us>

On 05.12.2010 18:26, Tom Lane wrote:
> Andres Freund<andres@anarazel.de>  writes:
>> On Sunday 05 December 2010 17:42:59 Tom Lane wrote:
>>> I think the reason the given example fails is just that it's all being
>>> done in one transaction.  If the null-containing row were known dead
>>> it wouldn't get indexed.  So: commit.
>
>> Um I doubt it.
>
> [ gets out gdb... ]  Oh: the reason GIN is complaining is that it's just
> looking at ARR_HASNULL(), and the array's has-nulls flag is still set
> because we don't bother to try to clear it after replacing one element
> of the array.  (Which in general would be an expensive thing to try to
> do...)
>
> If we were intending to leave GIN in its current nulls-hating state,
> the thing to do would be to replace the stupid ARR_HASNULL check with
> something more intelligent.  But really it needs to be fixed to handle
> nulls properly, so I'm thinking that might be a dead-end patch.

Sounds like we'd still want to just replace ARR_HASNULL() with something 
more intelligent in back-branches though.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (11+ messages)  latest in thread

Message-ID: <4CFD61BE.7060301@enterprisedb.com>
Permalink:  ../4CFD61BE.7060301@enterprisedb.com/
Also on:    postgresql.org/message-id/4CFD61BE.7060301@enterprisedb.com

 · 

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 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: heikki.linnakangas@enterprisedb.com, tgl@sss.pgh.pa.us, 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: <4CFD61BE.7060301@enterprisedb.com>
  References: <201012050650.oB56opvM090787@wwwmaster.postgresql.org> <201012051358.22813.andres@anarazel.de> <26122.1291567379@sss.pgh.pa.us> <201012051806.20719.andres@anarazel.de> <26741.1291570005@sss.pgh.pa.us> <4CFD61BE.7060301@enterprisedb.com>

* 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