Backend crash on query with UNION subselect

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Backend crash on query with UNION subselect
Date: 2001-01-12 09:26:45
Message-ID: 200101120926.f0C9QjO21307@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Vladimir Zamiussky (ltd(at)ippe(dot)obninsk(dot)ru) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Backend crash on query with UNION subselect

Long Description
There are two nearly identical tables, differ from each other by the length of corresponding fields of type CHARACTER (one has CHARACTER(20) field, other has CHARACTER(30) field).
when i do "select * from table1 union select * from table2" backend crashes with message:
FATAL 1: Memory exhausted in AllocSetAlloc()
pqReadData() -- backend closed channel unexpectadly.
This probably means the backend terminated abnormally before or while processing the request.

When char fileds have the same size, crash does not occur.

This bug takes place on 7.0.2 and 7.0.3 versions

Sample Code
create table pipe_alarms(
dtime timestamp default now(),
pipe_name char(30),
alarm_name char(30) );

create table gauge_alarms(
dtime timestamp default now(),
gauge_name char(20),
alarm_name char(30) );

insert into pipe_alarms(pipe_name,alarm_name) values('Pipe 1','LEAK');
insert into pipe_alarms(pipe_name,alarm_name) values('Pipe 2','No leaks');
insert into gauge_alarms(gauge_name,alarm_name) values('sensor_1','OverLimit');
insert into gauge_alarms(gauge_name,alarm_name) values('sensor_2','OverLimit');
insert into gauge_alarms(gauge_name,alarm_name) values('sensor_3','OverLimit');

select * from gauge_alarms union all select * from pipe_alarms

No file was uploaded with this report

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-01-12 15:12:01 Re: Backend crash on query with UNION subselect
Previous Message Bruce Momjian 2001-01-12 05:16:33 Re: JDBC PreparedStatement.setMaxRows() affects other objects intantiated from this class and it's parent class