Commit 05dea242 authored by Tom Lane's avatar Tom Lane

Repair unstable regression test.

Commit 0c882e52 tried to force table atest12 to have more-accurate-
than-default statistics; but transiently setting default_statistics_target
isn't enough for that, because autovacuum could come along and overwrite
the stats later.  This evidently explains some intermittent buildfarm
failures we've seen since then.  Repair by disabling autovac on this table.

Thanks to David Rowley for correctly diagnosing the cause.

Discussion: https://postgr.es/m/CA+hUKG+OUkQSOUTg=qo=S=fWa_tbm99i7rB7mfbHz1SYm4v-jQ@mail.gmail.com
parent 1b2c2946
...@@ -191,7 +191,8 @@ CREATE TABLE atest12 as ...@@ -191,7 +191,8 @@ CREATE TABLE atest12 as
SELECT x AS a, 10001 - x AS b FROM generate_series(1,10000) x; SELECT x AS a, 10001 - x AS b FROM generate_series(1,10000) x;
CREATE INDEX ON atest12 (a); CREATE INDEX ON atest12 (a);
CREATE INDEX ON atest12 (abs(a)); CREATE INDEX ON atest12 (abs(a));
-- results below depend on having quite accurate stats for atest12 -- results below depend on having quite accurate stats for atest12, so...
ALTER TABLE atest12 SET (autovacuum_enabled = off);
SET default_statistics_target = 10000; SET default_statistics_target = 10000;
VACUUM ANALYZE atest12; VACUUM ANALYZE atest12;
RESET default_statistics_target; RESET default_statistics_target;
......
...@@ -136,7 +136,8 @@ CREATE TABLE atest12 as ...@@ -136,7 +136,8 @@ CREATE TABLE atest12 as
SELECT x AS a, 10001 - x AS b FROM generate_series(1,10000) x; SELECT x AS a, 10001 - x AS b FROM generate_series(1,10000) x;
CREATE INDEX ON atest12 (a); CREATE INDEX ON atest12 (a);
CREATE INDEX ON atest12 (abs(a)); CREATE INDEX ON atest12 (abs(a));
-- results below depend on having quite accurate stats for atest12 -- results below depend on having quite accurate stats for atest12, so...
ALTER TABLE atest12 SET (autovacuum_enabled = off);
SET default_statistics_target = 10000; SET default_statistics_target = 10000;
VACUUM ANALYZE atest12; VACUUM ANALYZE atest12;
RESET default_statistics_target; RESET default_statistics_target;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment