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

Re: Fix for gistchoose

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix for gistchoose
Date: 2012-08-30 20:21:57
Message-ID: CA+TgmoZgdr8=LgEajexHmD7mPH6TZZ2jJ-E8YmRqFFgVn37eWg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, Aug 30, 2012 at 4:15 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> I noticed all that, but didn't feel like putting in the effort to make
>> it better.  I would have been happy to have someone else pick up the
>> patch, but as it had been languishing I thought it would be better to
>> get it committed more or less as it was than to wait for someone to
>> have time to make it beautiful.  If you want to hack on it more that's
>> fine with me.  I kind of wonder if we ought to rename the variables,
>> and maybe turn sum_grow into a boolean.   But I'm not really eager to
>> go crazy if this is something we have to back-patch.
>
> Yeah, the idea of replacing sum_grow with a boolean just occurred to me
> too.  As is, I think the code is making some less-than-portable
> assumptions about what will happen if sum_grow overflows; which can
> definitely happen, seeing that gistpenalty and its callees intentionally
> return infinity in some cases.  I'd rather it didn't attempt to add
> column penalties together, and I think there's a case to be made that
> not doing so is a back-patchable bug fix.

Keep in mind that the worst case outcome is the index quality is worse
than it otherwise would have been, so it's not like
OMG-PostgreSQ-eats-your-data.

> I'll take a shot at improving this some more.

Okey dokey.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


In response to

Responses

pgsql-hackers by date

Next:From: Peter GeogheganDate: 2012-08-30 20:25:44
Subject: Re: effective_io_concurrency
Previous:From: Joe AbbateDate: 2012-08-30 20:18:05
Subject: 9.2rc1 build requirements

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