Обсуждение: BUG #10527: TRAP when joining local table with view on tds_fdw foreign table

Поиск
Список
Период
Сортировка

BUG #10527: TRAP when joining local table with view on tds_fdw foreign table

От
gunnar.bluth@pro-open.de
Дата:
The following bug has been logged on the website:

Bug reference:      10527
Logged by:          Gunnar "Nick" Bluth
Email address:      gunnar.bluth@pro-open.de
PostgreSQL version: 9.4beta1
Operating system:   RHEL 6.5
Description:

Greetings!

Not sure if this might be a 9.4 regression or if the FDW interface has
changed and tds_fdw needs some tweaking, however:

When I join a local table with a view on a foreign table (tds_fdw), I get

TRAP: FailedAssertion("!(outer_rel->rows > 0)", File: "indxpath.c", Line:
1861)

and the server restarts.

This is reproducable and happens even when EXPLAINing the query.

The forreign table, the view and the local table can be accessed normally,
also when filtering by the columns used for the crashing join.

Cheers,

Nick

Re: BUG #10527: TRAP when joining local table with view on tds_fdw foreign table

От
Tom Lane
Дата:
gunnar.bluth@pro-open.de writes:
> Not sure if this might be a 9.4 regression or if the FDW interface has
> changed and tds_fdw needs some tweaking, however:

> When I join a local table with a view on a foreign table (tds_fdw), I get

> TRAP: FailedAssertion("!(outer_rel->rows > 0)", File: "indxpath.c", Line:
> 1861)

This looks like tds_fdw is neglecting its responsibility to deliver a
positive rowcount estimate for the foreign relation.  (Most places in the
core code use clamp_row_est(), which forces the value to be more than zero
along with rounding it to nearest integer.)  You'll need to report it to
the author of tds_fdw.

            regards, tom lane

Re: BUG #10527: TRAP when joining local table with view on tds_fdw foreign table

От
"Gunnar \"Nick\" Bluth"
Дата:
Am 04.06.2014 18:35, schrieb Tom Lane:
> gunnar.bluth@pro-open.de writes:
>> Not sure if this might be a 9.4 regression or if the FDW interface has
>> changed and tds_fdw needs some tweaking, however:
>> When I join a local table with a view on a foreign table (tds_fdw), I get
>> TRAP: FailedAssertion("!(outer_rel->rows > 0)", File: "indxpath.c", Line:
>> 1861)
> This looks like tds_fdw is neglecting its responsibility to deliver a
> positive rowcount estimate for the foreign relation.  (Most places in the
> core code use clamp_row_est(), which forces the value to be more than zero
> along with rounding it to nearest integer.)  You'll need to report it to
> the author of tds_fdw.
>
>             regards, tom lane

Chhers Tom, will do so.

N.B. though that I've not had this issue when doing exactly the same
stuff on 9.3, hence the bug report. Might be worth a footnote in the
release notes (i.e., _if_ e.g. the failing assertion has been introduced
w/ 9.4).

Cheers,

--
Gunnar "Nick" Bluth
RHCE/SCLA

Mobil +49 172 8853339
Email: gunnar.bluth@pro-open.de
__________________________________________________________________________
In 1984 mainstream users were choosing VMS over UNIX. Ten years later
they are choosing Windows over UNIX. What part of that message aren't you
getting? - Tom Payne

Re: BUG #10527: TRAP when joining local table with view on tds_fdw foreign table

От
Tom Lane
Дата:
"Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de> writes:
> N.B. though that I've not had this issue when doing exactly the same
> stuff on 9.3, hence the bug report. Might be worth a footnote in the
> release notes (i.e., _if_ e.g. the failing assertion has been introduced
> w/ 9.4).

No, that assert came in with parameterized paths in 9.2.  Not clear why
you'd be seeing it only now, unless maybe you were running non-assert
builds before?

            regards, tom lane

Re: BUG #10527: TRAP when joining local table with view on tds_fdw foreign table

От
"Gunnar \"Nick\" Bluth"
Дата:
Am 04.06.2014 20:06, schrieb Tom Lane:
> "Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de> writes:
>> N.B. though that I've not had this issue when doing exactly the same
>> stuff on 9.3, hence the bug report. Might be worth a footnote in the
>> release notes (i.e., _if_ e.g. the failing assertion has been introduced
>> w/ 9.4).
> No, that assert came in with parameterized paths in 9.2.  Not clear why
> you'd be seeing it only now, unless maybe you were running non-assert
> builds before?
Both have been installed from the YUM repository. I reckon the beta RPMs
have all kinds of debugging enabled, whilst the GA don't?

--
Gunnar "Nick" Bluth
RHCE/SCLA

Mobil +49 172 8853339
Email: gunnar.bluth@pro-open.de
__________________________________________________________________________
In 1984 mainstream users were choosing VMS over UNIX. Ten years later
they are choosing Windows over UNIX. What part of that message aren't you
getting? - Tom Payne

Re: BUG #10527: TRAP when joining local table with view on tds_fdw foreign table

От
Tom Lane
Дата:
"Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de> writes:
> Am 04.06.2014 20:06, schrieb Tom Lane:
>> No, that assert came in with parameterized paths in 9.2.  Not clear why
>> you'd be seeing it only now, unless maybe you were running non-assert
>> builds before?

> Both have been installed from the YUM repository. I reckon the beta RPMs
> have all kinds of debugging enabled, whilst the GA don't?

Well, the beta evidently has --enable-cassert, or you wouldn't be seeing
this.  I'd expect production builds to not have --enable-cassert, but
I don't know Devrim's packaging policies for sure.

            regards, tom lane