BUG #3301: explain crashes server on simple (?) query - Mailing list pgsql-bugs
From | Leszek Trenkner |
---|---|
Subject | BUG #3301: explain crashes server on simple (?) query |
Date | |
Msg-id | 200705240118.l4O1Iha0047413@wwwmaster.postgresql.org Whole thread Raw |
Responses |
Re: BUG #3301: explain crashes server on simple (?) query
|
List | pgsql-bugs |
The following bug has been logged online: Bug reference: 3301 Logged by: Leszek Trenkner Email address: olaf@post.pl PostgreSQL version: 8.3devel Operating system: Linux (Ubuntu Fiesty 7.04) Description: explain crashes server on simple (?) query Details: When I try to EXPLAIN or EXPLAIN analyze following query, server reports crash and restarts (output from psql session follows): ------------------------------------------------ crash=# explain select t.id, foo.name from t join (select ta.id, ta.name from ta union select tb.id, tb.name from tb ) foo on foo.id = any (t.ids); server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. !> ------------------------------------------------ But, if I change UNION to UNION ALL it works as expected: ------------------------------------------------ crash=# explain select t.id, foo.name from t join (select ta.id, ta.name from ta union all select tb.id, tb.name from tb ) foo on foo.id = any (t.ids); QUERY PLAN ------------------------------------------------------- Nested Loop (cost=1.05..4.09 rows=1 width=10) Join Filter: (foo.id = ANY (t.ids)) -> Append (cost=0.00..2.06 rows=6 width=10) -> Seq Scan on ta (cost=0.00..1.03 rows=3 width=10) -> Seq Scan on tb (cost=0.00..1.03 rows=3 width=10) -> Materialize (cost=1.05..1.10 rows=5 width=47) -> Seq Scan on t (cost=0.00..1.05 rows=5 width=47) (7 rows) ------------------------------------------------------- This all on today's (2007-05-24) CSV 8.3 development version. The same bug was in SVN version build from CSV on 2007-04-27. The server's log says: ----------------------------------------- 2007-05-24 02:27:44 CEST <@ > : LOG: server process (PID 18536) was terminated by signal 11: Segmentation fault 2007-05-24 02:27:44 CEST <@ > : LOG: terminating any other active server processes 2007-05-24 02:27:44 CEST <postgres@xxx postgres> idle: WARNING: terminating connection because of crash of another server process 2007-05-24 02:27:44 CEST <postgres@xxx postgres> idle: DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 2007-05-24 02:27:44 CEST <postgres@xxx postgres> idle: HINT: In a moment you should be able to reconnect to the database and repeat your command. . . . 2007-05-24 02:27:44 CEST <@ > : LOG: all server processes terminated; reinitializing --------------------------------------------------- I'll post schema for bug recreation on pgsql-bugs. Greetings, Leszek Trenkner
pgsql-bugs by date: