Tom Lane wrote:
> "Leszek Trenkner" <[EMAIL PROTECTED]> writes:
>> I'll post schema for bug recreation on pgsql-bugs.
>
> Yes?
>
> regards, tom lane
Well, I bug appeared on list with a long delay, so in the morning I didn't
notice it yet. Database dump that allows me to recreate situation comes
attached. It's a really simple query, and today I reproduced the very same
crash on different machine.
It doesn't happen on stock Ubuntu's 8.2 ("PostgreSQL 8.2.4 on
i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2 (Ubuntu
4.1.2-0ubuntu4)").
Server log with 'debug5' level:
"PostgreSQL 8.3devel on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2
(Ubuntu 4.1.2-0ubuntu4)"
--------------------------------------------------------------------------
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: DEBUG: 00000:
StartTransactionCommand
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: LOCATION:
start_xact_command, postgres.c:2248
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: STATEMENT:
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);
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: DEBUG: 00000:
StartTransaction
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: LOCATION:
ShowTransactionState, xact.c:4031
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: STATEMENT:
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);
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: DEBUG: 00000:
name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid:
757/1/0, nestlvl: 1, children: <>
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: LOCATION:
ShowTransactionStateRec, xact.c:4056
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: STATEMENT:
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);
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> EXPLAIN: DEBUG: 00000:
ProcessUtility
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> EXPLAIN: LOCATION:
PortalRunUtility, pquery.c:1142
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> EXPLAIN: STATEMENT:
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);
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: reaping dead processes
2007-05-24 18:55:50 CEST <@ > : LOCATION: reaper, postmaster.c:2022
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: server process (PID 9253) was
terminated by signal 11: Segmentation fault
2007-05-24 18:55:50 CEST <@ > : LOCATION: LogChildExit, postmaster.c:2460
2007-05-24 18:55:50 CEST <@ > : LOG: 00000: server process (PID 9253) was
terminated by signal 11: Segmentation fault
2007-05-24 18:55:50 CEST <@ > : LOCATION: LogChildExit, postmaster.c:2460
2007-05-24 18:55:50 CEST <@ > : LOG: 00000: terminating any other active
server processes
2007-05-24 18:55:50 CEST <@ > : LOCATION: HandleChildCrash,
postmaster.c:2332
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: sending SIGQUIT to process
9248
2007-05-24 18:55:50 CEST <@ > : LOCATION: HandleChildCrash,
postmaster.c:2369
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: sending SIGQUIT to process
9247
2007-05-24 18:55:50 CEST <@ > : LOCATION: HandleChildCrash,
postmaster.c:2369
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: sending SIGQUIT to process
9240
2007-05-24 18:55:50 CEST <@ > : LOCATION: HandleChildCrash,
postmaster.c:2383
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: sending SIGQUIT to process
9242
2007-05-24 18:55:50 CEST <@ > : LOCATION: HandleChildCrash,
postmaster.c:2395
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: sending SIGQUIT to process
9241
2007-05-24 18:55:50 CEST <@ > : LOCATION: HandleChildCrash,
postmaster.c:2417
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: reaping dead processes
2007-05-24 18:55:50 CEST <@ > : LOCATION: reaper, postmaster.c:2022
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: WARNING: 57P02:
terminating connection because of crash of another server process
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> 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 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: HINT: In a moment
you should be able to reconnect to the database and repeat your command.
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] crash> idle: LOCATION:
quickdie, postgres.c:2405
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] postgres> idle: WARNING:
57P02: terminating connection because of crash of another server process
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] 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 18:55:50 CEST <[EMAIL PROTECTED] postgres> idle: HINT: In a
moment you should be able to reconnect to the database and repeat your
command.
2007-05-24 18:55:50 CEST <[EMAIL PROTECTED] postgres> idle: LOCATION:
quickdie, postgres.c:2405
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: reaping dead processes
2007-05-24 18:55:50 CEST <@ > : LOCATION: reaper, postmaster.c:2022
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: server process (PID 9247)
exited with exit code 2
2007-05-24 18:55:50 CEST <@ > : LOCATION: LogChildExit, postmaster.c:2440
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: server process (PID 9248)
exited with exit code 2
2007-05-24 18:55:50 CEST <@ > : LOCATION: LogChildExit, postmaster.c:2440
2007-05-24 18:55:50 CEST <@ > : LOG: 00000: all server processes
terminated; reinitializing
2007-05-24 18:55:50 CEST <@ > : LOCATION: reaper, postmaster.c:2228
2007-05-24 18:55:50 CEST <@ > : DEBUG: 00000: shmem_exit(0)
2007-05-24 18:55:50 CEST <@ > : LOCATION: shmem_exit, ipc.c:155
----------------------------------------------------------------------------------------
Well, previous crash report was in fact from Debian 4.0 host, not Ubuntu:
"PostgreSQL 8.3devel on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2
20061115 (prerelease) (Debian 4.1.1-21)"
--
Greetings. Leszek Trenkner
--
-- PostgreSQL database dump
--
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--
COMMENT ON SCHEMA public IS 'Standard public schema';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: t; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t (
id integer DEFAULT nextval(('"public"."seq"'::text)::regclass) NOT NULL,
ids integer[]
);
ALTER TABLE public.t OWNER TO postgres;
--
-- Name: ta; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE ta (
id integer DEFAULT nextval(('"public"."seq"'::text)::regclass) NOT NULL,
"name" text NOT NULL
);
ALTER TABLE public.ta OWNER TO postgres;
--
-- Name: tb; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE tb (
id integer DEFAULT nextval(('"public"."seq"'::text)::regclass) NOT NULL,
"name" text NOT NULL
);
ALTER TABLE public.tb OWNER TO postgres;
--
-- Data for Name: t; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO t (id, ids) VALUES (1, '{1,3,8,9,10,12}');
INSERT INTO t (id, ids) VALUES (2, '{2,6,7,11,12}');
INSERT INTO t (id, ids) VALUES (3, '{3,5,6,9,11,14}');
INSERT INTO t (id, ids) VALUES (4, '{4,5,7,8,9,13}');
INSERT INTO t (id, ids) VALUES (5, '{5,6,8,10,12}');
--
-- Data for Name: ta; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO ta (id, "name") VALUES (6, 'ant_a');
INSERT INTO ta (id, "name") VALUES (7, 'ant_b');
INSERT INTO ta (id, "name") VALUES (8, 'ant_c');
--
-- Data for Name: tb; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO tb (id, "name") VALUES (9, 'bee_a');
INSERT INTO tb (id, "name") VALUES (10, 'bee_b');
INSERT INTO tb (id, "name") VALUES (11, 'bee_c');
--
-- Name: pk_t; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY t
ADD CONSTRAINT pk_t PRIMARY KEY (id);
--
-- Name: pk_ta; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY ta
ADD CONSTRAINT pk_ta PRIMARY KEY (id);
--
-- Name: pk_tb; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY tb
ADD CONSTRAINT pk_tb PRIMARY KEY (id);
--
-- Name: x_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- PostgreSQL database dump complete
--
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate