pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #12146: Crash when using UNION ALL
2+ messages / 2 participants
[nested] [flat]

* BUG #12146: Crash when using UNION ALL
@ 2014-12-04 16:03 me@jandrabek.cz
  2014-12-05 02:29 ` Re: BUG #12146: Crash when using UNION ALL Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: me@jandrabek.cz @ 2014-12-04 16:03 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      12146
Logged by:          Jan Drabek
Email address:      me@jandrabek.cz
PostgreSQL version: 9.3.5
Operating system:   OS X 10.10 (via Macports)
Description:        

Since 9.3.5 my PostgreSQL crashes when certain pattern in queries appears.
(Version 9.3.4 is not affected.)

After cutting all dependencies and columns from table foo it is only having
one column with BIGINT type.

The query is:
SELECT *
FROM (
       SELECT id
       FROM (
              SELECT id FROM foo
              UNION ALL
              SELECT id FROM foo

            ) t
       UNION ALL

       SELECT id FROM foo
     ) AS eop
  JOIN foo p ON p.id = eop.id

After execution of this query I get this in PostgreSQL log:
LOG:  server process (PID 11935) was terminated by signal 11: Segmentation
fault

However it is reproducible only on my machine (dumping database is of no
good).

Interesting observations:
 - After executing ANALYZE foo; problems disappear (corrupted statistics?)
 - Using UNION instead of UNION ALL makes it work.
 - Duplicating database on my machine (via pgadmin dump and load) doesn't
change this behaviour (i.e. it still crashes even on the newly loaded
database).

However I wasn't able to reproduce problem on different machine.
Any ideas what to do next in order to find the cause? (I tried to use
DEBUG5, but there were nothing interesting in the log).

Thanks
jan Drábek


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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #12146: Crash when using UNION ALL
  2014-12-04 16:03 BUG #12146: Crash when using UNION ALL me@jandrabek.cz
@ 2014-12-05 02:29 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2014-12-05 02:29 UTC (permalink / raw)
  To: me@jandrabek.cz; +Cc: pgsql-bugs

me@jandrabek.cz writes:
> Since 9.3.5 my PostgreSQL crashes when certain pattern in queries appears.
> (Version 9.3.4 is not affected.)

This query looks like it might have been fixed by commit
b2b95de61e2e1c4647fa902c3b946109c55451c4, but that hasn't made it into
any released version yet :-(

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2014-12-05 02:29 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-12-04 16:03 BUG #12146: Crash when using UNION ALL me@jandrabek.cz
2014-12-05 02:29 ` Tom Lane <tgl@sss.pgh.pa.us>

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