This is an automated email from the ASF dual-hosted git repository.

reshke pushed a commit to branch cp_a45c950ae35e53de40_main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 6fdfb47360bc10b94a3b14a4d9211220d13c4278
Author: reshke <[email protected]>
AuthorDate: Mon Mar 23 09:32:54 2026 +0000

    Add allow_segment_DML to utility test function
---
 src/test/regress/expected/matview.out | 2 ++
 src/test/regress/sql/matview.sql      | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/test/regress/expected/matview.out 
b/src/test/regress/expected/matview.out
index db5c4ea6ac8..17a7173415b 100644
--- a/src/test/regress/expected/matview.out
+++ b/src/test/regress/expected/matview.out
@@ -621,6 +621,7 @@ DROP OWNED BY regress_user_mvtest CASCADE;
 DROP ROLE regress_user_mvtest;
 -- Concurrent refresh requires a unique index on the materialized
 -- view. Test what happens if it's dropped during the refresh.
+SET allow_segment_DML = ON;
 CREATE OR REPLACE FUNCTION mvtest_drop_the_index()
   RETURNS bool AS $$
 BEGIN
@@ -635,6 +636,7 @@ CREATE UNIQUE INDEX mvtest_drop_idx ON drop_idx_matview (i);
 REFRESH MATERIALIZED VIEW CONCURRENTLY drop_idx_matview;
 ERROR:  could not find suitable unique index on materialized view
 DROP MATERIALIZED VIEW drop_idx_matview; -- clean up
+RESET allow_segment_DML;
 -- make sure that create WITH NO DATA works via SPI
 BEGIN;
 CREATE FUNCTION mvtest_func()
diff --git a/src/test/regress/sql/matview.sql b/src/test/regress/sql/matview.sql
index 1b26b26ab38..ec117f79af2 100644
--- a/src/test/regress/sql/matview.sql
+++ b/src/test/regress/sql/matview.sql
@@ -238,6 +238,7 @@ DROP ROLE regress_user_mvtest;
 
 -- Concurrent refresh requires a unique index on the materialized
 -- view. Test what happens if it's dropped during the refresh.
+SET allow_segment_DML = ON;
 CREATE OR REPLACE FUNCTION mvtest_drop_the_index()
   RETURNS bool AS $$
 BEGIN
@@ -252,6 +253,7 @@ CREATE MATERIALIZED VIEW drop_idx_matview AS
 CREATE UNIQUE INDEX mvtest_drop_idx ON drop_idx_matview (i);
 REFRESH MATERIALIZED VIEW CONCURRENTLY drop_idx_matview;
 DROP MATERIALIZED VIEW drop_idx_matview; -- clean up
+RESET allow_segment_DML;
 
 -- make sure that create WITH NO DATA works via SPI
 BEGIN;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to