Closed reshke closed 3 months ago
This bug does not reproduce in tests, because in tests we use begin/rollback or begin/commit. It this case it works fine
reshke=# begin;
BEGIN
reshke=*# create incremental materialized view mv1 as select * from tt ;
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'i' as the Cloudberry Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
SELECT 0
reshke=*# truncate tt;
TRUNCATE TABLE
reshke=*# rollback ;
ROLLBACK
reshke=# create incremental materialized view mv1 as select * from tt ;
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'i' as the Cloudberry Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
SELECT 0
reshke=# begin;
BEGIN
reshke=*# truncate tt;
TRUNCATE TABLE
reshke=*# rollback ;
ROLLBACK
reshke=#
Should I add my test case to incremental_view.sql tests?
add my test case to incremental_view.sql tests
that's good idea.
On current HEAD, there is bug with base table TRUNCATE for IMMV
Provided patch fixes it.
Fix borrowed from https://www.postgresql.org/message-id/20240711132357.fe3f78c184cfa99159208178%40sranhm.sraoss.co.jp