]> granicus.if.org Git - postgresql/commitdiff
Remove useless and rather expensive stanza in matview regression test.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 May 2017 23:37:01 +0000 (19:37 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 May 2017 23:37:01 +0000 (19:37 -0400)
This removes a test case added by commit b69ec7cc9, 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 1d6c72a55, 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

src/test/regress/expected/matview.out
src/test/regress/sql/matview.sql

index 1e34b9b6d75deaf6b55c812c1277bb8d91ef1243..ef5b21aa3a62e9c67f4db7d003d8a7bc59894e82 100644 (file)
@@ -382,26 +382,6 @@ NOTICE:  drop cascades to 3 other objects
 DETAIL:  drop cascades to view mvtest_vt2
 drop cascades to materialized view mv_test2
 drop cascades to materialized view mv_test3
--- test that vacuum does not make empty matview look unpopulated
-CREATE TABLE mvtest_huge (i int);
-INSERT INTO mvtest_huge VALUES (generate_series(1,100000));
-CREATE MATERIALIZED VIEW mvtest_hugeview AS SELECT * FROM mvtest_huge WHERE i % 2 = 0;
-CREATE INDEX mvtest_hugeviewidx ON mvtest_hugeview (i);
-DELETE FROM mvtest_huge;
-REFRESH MATERIALIZED VIEW mvtest_hugeview;
-SELECT * FROM mvtest_hugeview WHERE i < 10;
- i 
----
-(0 rows)
-
-VACUUM ANALYZE mvtest_hugeview;
-SELECT * FROM mvtest_hugeview WHERE i < 10;
- i 
----
-(0 rows)
-
-DROP TABLE mvtest_huge CASCADE;
-NOTICE:  drop cascades to materialized view mvtest_hugeview
 -- test that duplicate values on unique index prevent refresh
 CREATE TABLE mvtest_foo(a, b) AS VALUES(1, 10);
 CREATE MATERIALIZED VIEW mvtest_mv AS SELECT * FROM mvtest_foo;
index e342918a3d4893e58168f678dfd13e3f5c601e34..94829b9eaad1292d1ae604f97f680b64e39407a2 100644 (file)
@@ -122,18 +122,6 @@ SELECT relispopulated FROM pg_class WHERE oid = 'mv_test3'::regclass;
 
 DROP VIEW mvtest_vt1 CASCADE;
 
--- test that vacuum does not make empty matview look unpopulated
-CREATE TABLE mvtest_huge (i int);
-INSERT INTO mvtest_huge VALUES (generate_series(1,100000));
-CREATE MATERIALIZED VIEW mvtest_hugeview AS SELECT * FROM mvtest_huge WHERE i % 2 = 0;
-CREATE INDEX mvtest_hugeviewidx ON mvtest_hugeview (i);
-DELETE FROM mvtest_huge;
-REFRESH MATERIALIZED VIEW mvtest_hugeview;
-SELECT * FROM mvtest_hugeview WHERE i < 10;
-VACUUM ANALYZE mvtest_hugeview;
-SELECT * FROM mvtest_hugeview WHERE i < 10;
-DROP TABLE mvtest_huge CASCADE;
-
 -- test that duplicate values on unique index prevent refresh
 CREATE TABLE mvtest_foo(a, b) AS VALUES(1, 10);
 CREATE MATERIALIZED VIEW mvtest_mv AS SELECT * FROM mvtest_foo;