Re: planner fails on HEAD - Mailing list pgsql-hackers

From Tom Lane
Subject Re: planner fails on HEAD
Date
Msg-id 2327.1323113440@sss.pgh.pa.us
Whole thread Raw
In response to Re: planner fails on HEAD  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2011/12/4 Tom Lane <tgl@sss.pgh.pa.us>:
>> Is this x86?  I can't reproduce it on x86_64.

> yes, this is x86 platform
> uname -a
> Linux nemesis 2.6.35.14-106.fc14.i686.PAE #1 SMP Wed Nov 23 13:39:51
> UTC 2011 i686 i686 i386 GNU/Linux

I reproduced this with gcc 4.6.0 on Fedora 15 x86, too.

>> Also, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45691#c4
>> indicates that an explicit cast to double should help.  Would
>> you check if the problem goes away if the Asserts are changed to
>> 
>>        Assert((double) outerstartsel <= (double) outerendsel);
>>        Assert((double) innerstartsel <= (double) innerendsel);

> it doesn't help

Hmm ... I'm inclined to think this actually *is* a bug, since Jakub is
on record as saying it should work.  Nonetheless, we need a workaround,
since gcc versions behaving this way are going to be widespread for a
long time even if we convince them to do something about it (which I
suspect they wouldn't given their imperviousness to complaints about the
main issue).

I'm now thinking the best solution is just to drop these two Asserts.
They're not adding anything very useful given the previous ones (which
should be safe since those involve quantities rounded to integers).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: hiding variable-length fields from Form_pg_* structs
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Caching for stable expressions with constant arguments v3