Add explicit VACUUM to stabilize plans in inherit tests
authorTomas Vondra <[email protected]>
Sun, 8 Oct 2017 18:16:47 +0000 (20:16 +0200)
committerTomas Vondra <[email protected]>
Sun, 8 Oct 2017 18:16:47 +0000 (20:16 +0200)
On stock PostgreSQL, CREATE INDEX also updates statistics in pg_class
(relpages and reltuples). But Postgres-XL does not do that, which may
result in plan differences when the test relies on this behavior.

This is the same issue as in cfb055553687c257dd1d1ed123356c892f48a804,
but affecting inherit regression tests. So fix it in the same way, by
doing an explicit vacuum on the tables.

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

index 0f77b4378f20618d87bc04712dea30f8ca6769a9..03b143289670ae77fb8f97c7c9383b08f2223100 100644 (file)
@@ -1514,9 +1514,9 @@ insert into patest2
 create index patest0i on patest0(id);
 create index patest1i on patest1(id);
 create index patest2i on patest2(id);
-analyze patest0;
-analyze patest1;
-analyze patest2;
+vacuum analyze patest0;
+vacuum analyze patest1;
+vacuum analyze patest2;
 analyze int4_tbl;
 explain (costs off, num_nodes off, nodes off)
 select * from patest0 join (select f1 from int4_tbl where f1 = 0 limit 1) ss on id = f1;
index e59b7545077fd2ecff00cfed810ab7fb6bef026b..18f3a7b2ee978e678d2a696ecfbd3c71c2e46e8b 100644 (file)
@@ -515,9 +515,9 @@ insert into patest2
 create index patest0i on patest0(id);
 create index patest1i on patest1(id);
 create index patest2i on patest2(id);
-analyze patest0;
-analyze patest1;
-analyze patest2;
+vacuum analyze patest0;
+vacuum analyze patest1;
+vacuum analyze patest2;
 analyze int4_tbl;
 
 explain (costs off, num_nodes off, nodes off)