pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: maxim.boguk@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #7579: repeatable Segmentation fault on some query (even in Explain)
Date: Wed, 03 Oct 2012 10:14:36 +0000
Message-ID: <E1TJLyO-0001h7-B7@wrigleys.postgresql.org> (raw)

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 = 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.







Message-ID: <E1TJLyO-0001h7-B7@wrigleys.postgresql.org>
Permalink:  ../E1TJLyO-0001h7-B7@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1TJLyO-0001h7-B7@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: maxim.boguk@gmail.com
  Subject: Re: BUG #7579: repeatable Segmentation fault on some query (even in Explain)
  In-Reply-To: <E1TJLyO-0001h7-B7@wrigleys.postgresql.org>
  References: <E1TJLyO-0001h7-B7@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox