aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-06-04 13:46:34 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-06-04 13:46:34 -0400
commitbac99475eb6e9e6d69a91fee30b5420b8e0115be (patch)
treef0c2d4aa9a65e8b49f623737d8b0fcfd1556f002 /src
parent5cdf25e16843dff33dbc2ddc02941458032e3ad4 (diff)
downloadpostgresql-bac99475eb6e9e6d69a91fee30b5420b8e0115be.tar.gz
postgresql-bac99475eb6e9e6d69a91fee30b5420b8e0115be.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/brin.out6
-rw-r--r--src/test/regress/sql/brin.sql6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/regress/expected/brin.out b/src/test/regress/expected/brin.out
index 2be4b7ca3f6..ba0824428ec 100644
--- a/src/test/regress/expected/brin.out
+++ b/src/test/regress/expected/brin.out
@@ -55,13 +55,13 @@ INSERT INTO brintest SELECT
int4range(thousand, twothousand),
format('%s/%s%s', odd, even, tenthous)::pg_lsn,
box(point(odd, even), point(thousand, twothousand))
-FROM tenk1 LIMIT 100;
+FROM tenk1 ORDER BY unique2 LIMIT 100;
-- throw in some NULL's and different values
INSERT INTO brintest (inetcol, cidrcol, int4rangecol) SELECT
inet 'fe80::6e40:8ff:fea9:8c46' + tenthous,
cidr 'fe80::6e40:8ff:fea9:8c46' + tenthous,
'empty'::int4range
-FROM tenk1 LIMIT 25;
+FROM tenk1 ORDER BY thousand, tenthous LIMIT 25;
CREATE INDEX brinidx ON brintest USING brin (
byteacol,
charcol,
@@ -238,7 +238,7 @@ INSERT INTO brintest SELECT
int4range(thousand, twothousand),
format('%s/%s%s', odd, even, tenthous)::pg_lsn,
box(point(odd, even), point(thousand, twothousand))
-FROM tenk1 LIMIT 5 OFFSET 5;
+FROM tenk1 ORDER BY unique2 LIMIT 5 OFFSET 5;
VACUUM brintest; -- force a summarization cycle in brinidx
UPDATE brintest SET int8col = int8col * int4col;
UPDATE brintest SET textcol = '' WHERE textcol IS NOT NULL;
diff --git a/src/test/regress/sql/brin.sql b/src/test/regress/sql/brin.sql
index f47ef04c439..881a13b1b0b 100644
--- a/src/test/regress/sql/brin.sql
+++ b/src/test/regress/sql/brin.sql
@@ -56,14 +56,14 @@ INSERT INTO brintest SELECT
int4range(thousand, twothousand),
format('%s/%s%s', odd, even, tenthous)::pg_lsn,
box(point(odd, even), point(thousand, twothousand))
-FROM tenk1 LIMIT 100;
+FROM tenk1 ORDER BY unique2 LIMIT 100;
-- throw in some NULL's and different values
INSERT INTO brintest (inetcol, cidrcol, int4rangecol) SELECT
inet 'fe80::6e40:8ff:fea9:8c46' + tenthous,
cidr 'fe80::6e40:8ff:fea9:8c46' + tenthous,
'empty'::int4range
-FROM tenk1 LIMIT 25;
+FROM tenk1 ORDER BY thousand, tenthous LIMIT 25;
CREATE INDEX brinidx ON brintest USING brin (
byteacol,
@@ -245,7 +245,7 @@ INSERT INTO brintest SELECT
int4range(thousand, twothousand),
format('%s/%s%s', odd, even, tenthous)::pg_lsn,
box(point(odd, even), point(thousand, twothousand))
-FROM tenk1 LIMIT 5 OFFSET 5;
+FROM tenk1 ORDER BY unique2 LIMIT 5 OFFSET 5;
VACUUM brintest; -- force a summarization cycle in brinidx