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

Commit bac9947

Browse files
committed
Stabilize results of brin regression test.
This test used seqscans on tenk1, with LIMIT, to build test data. That works most of the time, but if the synchronized-seqscan logic kicks in, we get varying test data. This seems likely to explain the erratic test failures on buildfarm member chipmunk, which uses smaller-than-default shared_buffers. To fix, add ORDER BY clauses to force the ordering to be what it was implicitly being assumed to be. Peter Geoghegan had noticed this with respect to one of the trouble spots, though not the ones actually causing the chipmunk issue.
1 parent 5cdf25e commit bac9947

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/test/regress/expected/brin.out

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ INSERT INTO brintest SELECT
5555
int4range(thousand, twothousand),
5656
format('%s/%s%s', odd, even, tenthous)::pg_lsn,
5757
box(point(odd, even), point(thousand, twothousand))
58-
FROM tenk1 LIMIT 100;
58+
FROM tenk1 ORDER BY unique2 LIMIT 100;
5959
-- throw in some NULL's and different values
6060
INSERT INTO brintest (inetcol, cidrcol, int4rangecol) SELECT
6161
inet 'fe80::6e40:8ff:fea9:8c46' + tenthous,
6262
cidr 'fe80::6e40:8ff:fea9:8c46' + tenthous,
6363
'empty'::int4range
64-
FROM tenk1 LIMIT 25;
64+
FROM tenk1 ORDER BY thousand, tenthous LIMIT 25;
6565
CREATE INDEX brinidx ON brintest USING brin (
6666
byteacol,
6767
charcol,
@@ -238,7 +238,7 @@ INSERT INTO brintest SELECT
238238
int4range(thousand, twothousand),
239239
format('%s/%s%s', odd, even, tenthous)::pg_lsn,
240240
box(point(odd, even), point(thousand, twothousand))
241-
FROM tenk1 LIMIT 5 OFFSET 5;
241+
FROM tenk1 ORDER BY unique2 LIMIT 5 OFFSET 5;
242242
VACUUM brintest; -- force a summarization cycle in brinidx
243243
UPDATE brintest SET int8col = int8col * int4col;
244244
UPDATE brintest SET textcol = '' WHERE textcol IS NOT NULL;

src/test/regress/sql/brin.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ INSERT INTO brintest SELECT
5656
int4range(thousand, twothousand),
5757
format('%s/%s%s', odd, even, tenthous)::pg_lsn,
5858
box(point(odd, even), point(thousand, twothousand))
59-
FROM tenk1 LIMIT 100;
59+
FROM tenk1 ORDER BY unique2 LIMIT 100;
6060

6161
-- throw in some NULL's and different values
6262
INSERT INTO brintest (inetcol, cidrcol, int4rangecol) SELECT
6363
inet 'fe80::6e40:8ff:fea9:8c46' + tenthous,
6464
cidr 'fe80::6e40:8ff:fea9:8c46' + tenthous,
6565
'empty'::int4range
66-
FROM tenk1 LIMIT 25;
66+
FROM tenk1 ORDER BY thousand, tenthous LIMIT 25;
6767

6868
CREATE INDEX brinidx ON brintest USING brin (
6969
byteacol,
@@ -245,7 +245,7 @@ INSERT INTO brintest SELECT
245245
int4range(thousand, twothousand),
246246
format('%s/%s%s', odd, even, tenthous)::pg_lsn,
247247
box(point(odd, even), point(thousand, twothousand))
248-
FROM tenk1 LIMIT 5 OFFSET 5;
248+
FROM tenk1 ORDER BY unique2 LIMIT 5 OFFSET 5;
249249

250250
VACUUM brintest; -- force a summarization cycle in brinidx
251251

0 commit comments

Comments
 (0)