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

From Pavel Stehule
Subject Re: planner fails on HEAD
Date
Msg-id CAFj8pRBstZu74BDT4g-NwQtbWqnWtn2xOfsUZKc5gBcp1fWvyQ@mail.gmail.com
Whole thread Raw
In response to Re: planner fails on HEAD  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: planner fails on HEAD
Re: planner fails on HEAD
List pgsql-hackers
2011/12/4 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> #3  0x083a1dfe in ExceptionalCondition (conditionName=0x8505474
>> "!(innerstartsel <= innerendsel)", errorType=0x83db178
>> "FailedAssertion", fileName=0x8505140 "costsize.c", lineNumber=1937)
>> at assert.c:57
>
> [ scratches head ... ]  Given that it got past the previous assertions,
> surely that ought to be impossible.  Could we see the values of
> cost_mergejoin's local variables, please?

It is strange

when I put a fprintf(stderr, "const literal") to exactly before or
somewhere after assertion, then assertion is ok. Without fprintf
assertion fails again

it looks like gcc bug - gcc 4.5.1 20100924 (Red Hat 4.5.1) It was
configured just with --enable-debug and --enable-cassert

when I put elog before calculation outerstartsel,
innerstartsel,outerendsel and innerendsel then it fails

the output is  (last elog result)

outer_skip_rows: 0.0
inner_skip_rows: 1.0
outer_rows: 208.000
inner_rows: 1.00000

when I append elog to show selectivity, then it work again - related
selectivity is

outerstartsel: 0.000
outerendsel: 1.000
innerstartsel: 0.166667
innerendsel: 0.166667

Regards

Pavel Stehule


>
>                        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: cannot read pg_class without having selected a database / is this a bug?
Next
From: Tomas Vondra
Date:
Subject: Re: why local_preload_libraries does require a separate directory ?