Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1f303fd

Browse files
committed
Suppress occasional failures in brin regression test.
brin.sql included a call of brin_summarize_new_values(), and expected it to always report exactly 5 summarization events. This failed sometimes during parallel regression tests, as a consequence of the database-wide VACUUM in gist.sql getting there first. The most future-proof way to avoid variation in the test results is to forget about using brin_summarize_new_values() and just do a plain "VACUUM brintest", which will exercise the same code anyway. Having done that, there's no need for preventing autovacuum on brintest; doing so just reduces the scope of test coverage, so let's not.
1 parent fba12c8 commit 1f303fd

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/test/regress/expected/brin.out

+2-7
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CREATE TABLE brintest (byteacol bytea,
2626
int4rangecol int4range,
2727
lsncol pg_lsn,
2828
boxcol box
29-
) WITH (fillfactor=10, autovacuum_enabled=off);
29+
) WITH (fillfactor=10);
3030
INSERT INTO brintest SELECT
3131
repeat(stringu1, 8)::bytea,
3232
substr(stringu1, 1, 1)::"char",
@@ -239,11 +239,6 @@ INSERT INTO brintest SELECT
239239
format('%s/%s%s', odd, even, tenthous)::pg_lsn,
240240
box(point(odd, even), point(thousand, twothousand))
241241
FROM tenk1 LIMIT 5 OFFSET 5;
242-
SELECT brin_summarize_new_values('brinidx'::regclass);
243-
brin_summarize_new_values
244-
---------------------------
245-
5
246-
(1 row)
247-
242+
VACUUM brintest; -- force a summarization cycle in brinidx
248243
UPDATE brintest SET int8col = int8col * int4col;
249244
UPDATE brintest SET textcol = '' WHERE textcol IS NOT NULL;

src/test/regress/sql/brin.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CREATE TABLE brintest (byteacol bytea,
2626
int4rangecol int4range,
2727
lsncol pg_lsn,
2828
boxcol box
29-
) WITH (fillfactor=10, autovacuum_enabled=off);
29+
) WITH (fillfactor=10);
3030

3131
INSERT INTO brintest SELECT
3232
repeat(stringu1, 8)::bytea,
@@ -247,7 +247,7 @@ INSERT INTO brintest SELECT
247247
box(point(odd, even), point(thousand, twothousand))
248248
FROM tenk1 LIMIT 5 OFFSET 5;
249249

250-
SELECT brin_summarize_new_values('brinidx'::regclass);
250+
VACUUM brintest; -- force a summarization cycle in brinidx
251251

252252
UPDATE brintest SET int8col = int8col * int4col;
253253
UPDATE brintest SET textcol = '' WHERE textcol IS NOT NULL;

0 commit comments

Comments
 (0)