UNION query problem.(server crash)
nuko-yokohama opened this issue · comments
UNION query problem.(server crash)
When creating an INCREMENTAL MATERIALIZED VIEW,
the server process crashes if you specify a query with a UNION.
(commit id = 23151be)
execute log.
[ec2-user@ip-10-0-1-10 ivm]$ psql testdb -e -f union_query_crash.sql
DROP TABLE IF EXISTS table_x CASCADE;
psql:union_query_crash.sql:6: NOTICE: drop cascades to view xy_union_v
DROP TABLE
DROP TABLE IF EXISTS table_y CASCADE;
DROP TABLE
CREATE TABLE table_x (id int, data numeric);
CREATE TABLE
CREATE TABLE table_y (id int, data numeric);
CREATE TABLE
INSERT INTO table_x VALUES (generate_series(1, 3), random()::numeric);
INSERT 0 3
INSERT INTO table_y VALUES (generate_series(1, 3), random()::numeric);
INSERT 0 3
SELECT * FROM table_x;
id | data
----+--------------------
1 | 0.950724735058774
2 | 0.0222670808201144
3 | 0.391258547114841
(3 rows)
SELECT * FROM table_y;
id | data
----+--------------------
1 | 0.991717347778337
2 | 0.0528458947672874
3 | 0.965044982911163
(3 rows)
CREATE VIEW xy_union_v AS
SELECT 'table_x' AS name, * FROM table_x
UNION
SELECT 'table_y' AS name, * FROM table_y
;
CREATE VIEW
TABLE xy_union_v;
name | id | data
---------+----+--------------------
table_y | 2 | 0.0528458947672874
table_x | 2 | 0.0222670808201144
table_y | 3 | 0.965044982911163
table_x | 1 | 0.950724735058774
table_x | 3 | 0.391258547114841
table_y | 1 | 0.991717347778337
(6 rows)
CREATE INCREMENTAL MATERIALIZED VIEW xy_imv AS
SELECT 'table_x' AS name, * FROM table_x
UNION
SELECT 'table_y' AS name, * FROM table_y
;
psql:union_query_crash.sql:28: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
psql:union_query_crash.sql:28: fatal: connection to server was lost
Thank you for your pointing out this issue.
it was fixed a short time ago. Please close this issue if there is no problem.
Commit ID = b2e6209 The version has been fixed.
This issue closes.