BUG #7579: repeatable Segmentation fault on some query (even in Explain) - Mailing list pgsql-bugs

From maxim.boguk@gmail.com
Subject BUG #7579: repeatable Segmentation fault on some query (even in Explain)
Date
Msg-id E1TJLyO-0001h7-B7@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7579
Logged by:          Maxim Boguk
Email address:      maxim.boguk@gmail.com
PostgreSQL version: 9.2.1
Operating system:   Linux
Description:        =


Hi,

After testing migration to 9.2.1, Segmentation fault query were found.

It produce error:
2012-10-02 23:05:05 MSK LOG: server process (PID 28234) was terminated by
signal 11: Segmentation fault

It crash even with explain of the query.

I can not create self-contained test case yet... but I working on it...

Query:
select =

    OIR.OrderItemReserveID =

from OrderItemReserves as OIR =

inner join OrderItems as OI on (OI.OrderItemID =3D OIR.OrderItemID) =

left outer join ( =

    select =

        distinct CSI.SaleArticleID =

    from CatalogueSectionItems as CSI =

    inner join CatalogueSections as CS on (CS.CatalogueSectionID =3D
CSI.CatalogueSectionID) =

    where =

        CS.CatalogueID =3D 20083 =

) as CSI on (CSI.SaleArticleID =3D OI.SaleArticleID) =

where =

    OIR.ObjectStatusID =3D 1 =

    and OIR.Amount >0 =

    and (
        OIR.StoreGroupID =3D 5 =

        or (OIR.StoreGroupID =3D 6 and CSI.SaleArticleID is not null)
    )


Without distinct on left join subquery - no problem.
Without 'CSI.SaleArticleID is not null' part no problem too.

pgsql-bugs by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Please could you provide more specific step by step instructions to build this driver psqlodbc-09.01.0200 under Windows.
Next
From: maxim.boguk@gmail.com
Date:
Subject: BUG #7580: repeatable test case for the BUG #7579