Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85b3bcb

Browse files
committed
Remove useless and rather expensive stanza in matview regression test.
This removes a test case added by commitb69ec7c, which was intendedto exercise a corner case involving the rule used at that time thatmaterialized views were unpopulated iff they had physical size zero.We got rid of that rule very shortly later, in commit1d6c72a, butkept the test case. However, because the case now asks what VACUUMwill do to a zero-sized physical file, it would be pretty surprisingif the answer were ever anything but "nothing" ... and if things wereindeed that broken, surely we'd find it out from other tests. Sincethe test involves a table that's fairly large by regression-teststandards (100K rows), it's quite slow to run. Dropping it shouldsave some buildfarm cycles, so let's do that.Discussion:https://postgr.es/m/32386.1493831320@sss.pgh.pa.us
1 parent35ac926 commit85b3bcb

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
@@ -365,26 +365,6 @@ NOTICE: drop cascades to 3 other objects
365365
DETAIL: drop cascades to view v_test2
366366
drop cascades to materialized view mv_test2
367367
drop cascades to materialized view mv_test3
368-
-- test that vacuum does not make empty matview look unpopulated
369-
CREATE TABLE hoge (i int);
370-
INSERT INTO hoge VALUES (generate_series(1,100000));
371-
CREATE MATERIALIZED VIEW hogeview AS SELECT * FROM hoge WHERE i % 2 = 0;
372-
CREATE INDEX hogeviewidx ON hogeview (i);
373-
DELETE FROM hoge;
374-
REFRESH MATERIALIZED VIEW hogeview;
375-
SELECT * FROM hogeview WHERE i < 10;
376-
i
377-
---
378-
(0 rows)
379-
380-
VACUUM ANALYZE hogeview;
381-
SELECT * FROM hogeview WHERE i < 10;
382-
i
383-
---
384-
(0 rows)
385-
386-
DROP TABLE hoge CASCADE;
387-
NOTICE: drop cascades to materialized view hogeview
388368
-- allow subquery to reference unpopulated matview if WITH NO DATA is specified
389369
CREATE MATERIALIZED VIEW mv1 AS SELECT 1 AS col1 WITH NO DATA;
390370
CREATE MATERIALIZED VIEW mv2 AS SELECT * FROM mv1

‎src/test/regress/sql/matview.sql

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

114114
DROPVIEW v_test1 CASCADE;
115115

116-
-- test that vacuum does not make empty matview look unpopulated
117-
CREATETABLEhoge (iint);
118-
INSERT INTO hogeVALUES (generate_series(1,100000));
119-
CREATE MATERIALIZED VIEW hogeviewASSELECT*FROM hogeWHERE i %2=0;
120-
CREATEINDEXhogeviewidxON hogeview (i);
121-
DELETEFROM hoge;
122-
REFRESH MATERIALIZED VIEW hogeview;
123-
SELECT*FROM hogeviewWHERE i<10;
124-
VACUUM ANALYZE hogeview;
125-
SELECT*FROM hogeviewWHERE i<10;
126-
DROPTABLE hoge CASCADE;
127-
128116
-- allow subquery to reference unpopulated matview if WITH NO DATA is specified
129117
CREATE MATERIALIZED VIEW mv1ASSELECT1AS col1 WITH NO DATA;
130118
CREATE MATERIALIZED VIEW mv2ASSELECT*FROM mv1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp