Skip to content

Commit eea4f51

Browse files
committed
Add allow_segment_DML to utility test function
1 parent 7a3bddc commit eea4f51

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/test/regress/expected/matview.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@ DROP OWNED BY regress_user_mvtest CASCADE;
621621
DROP ROLE regress_user_mvtest;
622622
-- Concurrent refresh requires a unique index on the materialized
623623
-- view. Test what happens if it's dropped during the refresh.
624+
SET allow_segment_DML = ON;
624625
CREATE OR REPLACE FUNCTION mvtest_drop_the_index()
625626
RETURNS bool AS $$
626627
BEGIN
@@ -635,6 +636,7 @@ CREATE UNIQUE INDEX mvtest_drop_idx ON drop_idx_matview (i);
635636
REFRESH MATERIALIZED VIEW CONCURRENTLY drop_idx_matview;
636637
ERROR: could not find suitable unique index on materialized view
637638
DROP MATERIALIZED VIEW drop_idx_matview; -- clean up
639+
RESET allow_segment_DML;
638640
-- make sure that create WITH NO DATA works via SPI
639641
BEGIN;
640642
CREATE FUNCTION mvtest_func()

src/test/regress/sql/matview.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ DROP ROLE regress_user_mvtest;
238238

239239
-- Concurrent refresh requires a unique index on the materialized
240240
-- view. Test what happens if it's dropped during the refresh.
241+
SET allow_segment_DML = ON;
241242
CREATE OR REPLACE FUNCTION mvtest_drop_the_index()
242243
RETURNS bool AS $$
243244
BEGIN
@@ -252,6 +253,7 @@ CREATE MATERIALIZED VIEW drop_idx_matview AS
252253
CREATE UNIQUE INDEX mvtest_drop_idx ON drop_idx_matview (i);
253254
REFRESH MATERIALIZED VIEW CONCURRENTLY drop_idx_matview;
254255
DROP MATERIALIZED VIEW drop_idx_matview; -- clean up
256+
RESET allow_segment_DML;
255257

256258
-- make sure that create WITH NO DATA works via SPI
257259
BEGIN;

0 commit comments

Comments
 (0)