Skip site navigation (1) Skip section navigation (2)

Re: BUG #6278: Index scans on '>' condition on field with many NULLS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Maksym Boguk <maxim(dot)boguk(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6278: Index scans on '>' condition on field with many NULLS
Date: 2011-10-31 19:39:57
Message-ID: 6645.1320089997@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Oct 31, 2011 at 12:43 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> A patch along these lines should be pretty localized.  Has anyone
>> got an opinion on whether to back-patch or not?  This seems like a
>> performance bug, but given the lack of prior complaints, maybe we
>> shouldn't take any risks for it.

> I think my vote would be to just fix it in master.

After researching the issue, my patch looks like the attached.  This
seems to apply cleanly back to about 8.3, so I'm inclined to back-patch
that far.  It's pretty simple, and I think the reason we (I) got it
wrong to begin with is just lack of thought about the NULLs case.

			regards, tom lane


Attachment: stop-at-nulls.patch
Description: text/x-patch (4.7 KB)

In response to

pgsql-bugs by date

Next:From: Eye GeeDate: 2011-11-01 01:26:03
Subject: BUG #6280: adminpack.sql not found after postgresql-contrib has been installed
Previous:From: AlexanderDate: 2011-10-31 18:46:42
Subject: Hanging with pg_restore and large objects

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group