sraoss / pgsql-ivm

IVM (Incremental View Maintenance) development for PostgreSQL
Other
127 stars 12 forks source link

Segment fault if CREATE IMMV with GROUP BY clause #98

Closed thoshiai closed 4 years ago

thoshiai commented 4 years ago

Follow the steps below to reproduce.

test=# CREATE TABLE test (id int);
CREATE TABLE
test=# CREATE INCREMENTAL MATERIALIZED VIEW immv AS SELECT COUNT(id) FROM test GROUP BY id;
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.
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.
!?> 

This cause is that key column with GROUP BY clause is not contained in targetlist.

yugo-n commented 4 years ago

@thoshiai Is it already resolved?

tatsuo-ishii commented 4 years ago

I confirmed this has been fixed. ERROR: GROUP BY expression not appeared in select list is not supported on incrementally maintainable materialized view `

tatsuo-ishii commented 4 years ago

Close this issue now.