The following bug has been logged on the website:

Bug reference:      7579
Logged by:          Maxim Boguk
Email address:      maxim.bo...@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 = OIR.OrderItemID) 
left outer join ( 
    select 
        distinct CSI.SaleArticleID 
    from CatalogueSectionItems as CSI 
    inner join CatalogueSections as CS on (CS.CatalogueSectionID =
CSI.CatalogueSectionID) 
    where 
        CS.CatalogueID = 20083 
) as CSI on (CSI.SaleArticleID = OI.SaleArticleID) 
where 
    OIR.ObjectStatusID = 1 
    and OIR.Amount >0 
    and (
        OIR.StoreGroupID = 5 
        or (OIR.StoreGroupID = 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.





-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to