Backend crash on query with UNION subselect

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Backend crash on query with UNION subselect
Дата
Msg-id 200101120926.f0C9QjO21307@hub.org
обсуждение исходный текст
Ответы Re: Backend crash on query with UNION subselect  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Vladimir Zamiussky (ltd@ippe.obninsk.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
(onehas 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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: JDBC PreparedStatement.setMaxRows() affects other objects intantiated from this class and it's parent class
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Backend crash on query with UNION subselect