Skip to content

Commit 2ffe80c

Browse files
committed
Remove useless and rather expensive stanza in matview regression test.
This removes a test case added by commit b69ec7c, which was intended to exercise a corner case involving the rule used at that time that materialized views were unpopulated iff they had physical size zero. We got rid of that rule very shortly later, in commit 1d6c72a, but kept the test case. However, because the case now asks what VACUUM will do to a zero-sized physical file, it would be pretty surprising if the answer were ever anything but "nothing" ... and if things were indeed that broken, surely we'd find it out from other tests. Since the test involves a table that's fairly large by regression-test standards (100K rows), it's quite slow to run. Dropping it should save some buildfarm cycles, so let's do that. Discussion: https://postgr.es/m/32386.1493831320@sss.pgh.pa.us
1 parent 724cd4f commit 2ffe80c

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

src/test/regress/expected/matview.out

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -382,26 +382,6 @@ NOTICE: drop cascades to 3 other objects
382382
DETAIL: drop cascades to view v_test2
383383
drop cascades to materialized view mv_test2
384384
drop cascades to materialized view mv_test3
385-
-- test that vacuum does not make empty matview look unpopulated
386-
CREATE TABLE hoge (i int);
387-
INSERT INTO hoge VALUES (generate_series(1,100000));
388-
CREATE MATERIALIZED VIEW hogeview AS SELECT * FROM hoge WHERE i % 2 = 0;
389-
CREATE INDEX hogeviewidx ON hogeview (i);
390-
DELETE FROM hoge;
391-
REFRESH MATERIALIZED VIEW hogeview;
392-
SELECT * FROM hogeview WHERE i < 10;
393-
i
394-
---
395-
(0 rows)
396-
397-
VACUUM ANALYZE hogeview;
398-
SELECT * FROM hogeview WHERE i < 10;
399-
i
400-
---
401-
(0 rows)
402-
403-
DROP TABLE hoge CASCADE;
404-
NOTICE: drop cascades to materialized view hogeview
405385
-- test that duplicate values on unique index prevent refresh
406386
CREATE TABLE foo(a, b) AS VALUES(1, 10);
407387
CREATE MATERIALIZED VIEW mv AS SELECT * FROM foo;

src/test/regress/sql/matview.sql

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,6 @@ SELECT relispopulated FROM pg_class WHERE oid = 'mv_test3'::regclass;
122122

123123
DROP VIEW v_test1 CASCADE;
124124

125-
-- test that vacuum does not make empty matview look unpopulated
126-
CREATE TABLE hoge (i int);
127-
INSERT INTO hoge VALUES (generate_series(1,100000));
128-
CREATE MATERIALIZED VIEW hogeview AS SELECT * FROM hoge WHERE i % 2 = 0;
129-
CREATE INDEX hogeviewidx ON hogeview (i);
130-
DELETE FROM hoge;
131-
REFRESH MATERIALIZED VIEW hogeview;
132-
SELECT * FROM hogeview WHERE i < 10;
133-
VACUUM ANALYZE hogeview;
134-
SELECT * FROM hogeview WHERE i < 10;
135-
DROP TABLE hoge CASCADE;
136-
137125
-- test that duplicate values on unique index prevent refresh
138126
CREATE TABLE foo(a, b) AS VALUES(1, 10);
139127
CREATE MATERIALIZED VIEW mv AS SELECT * FROM foo;

0 commit comments

Comments
 (0)