summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Vondra2017-08-25 22:05:15 +0000
committerTomas Vondra2017-08-25 22:32:02 +0000
commit2e8c92867356ff2f17ad3072a3ff755854704d32 (patch)
tree69ec9862603406032227c8050799a041a30b45da
parent14ac8efb29efb78b13f8e2155bdf69fe0ef36462 (diff)
Make float8_tbl replicated to stabilize float8 test
As the table has just a single float8 column, XL automatically picks ROUNDROBIN distribution. Commit 1d14325822 randomized selection of the initial node, which with single-row inserts (used by the float8 tests) effectively means random distribution, while before that all the rows would be routed to the first node. Some of the tests in float8 test suite seem to be sensitive to this, in particular this overflow test: SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f ORDER BY f1; ERROR: value out of range: overflow One of the rows (containing 1.2345678901234e-200) triggers an underflow, so when the database hits it first, it will report this error instead: ERROR: value out of range: underflow The probability of hitting this is however fairly low (less than 10%), as the executor has to touch the underflowing value first.
-rw-r--r--src/test/regress/expected/float8.out2
-rw-r--r--src/test/regress/sql/float8.sql2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/regress/expected/float8.out b/src/test/regress/expected/float8.out
index 061ff87813..ce39f9b5fe 100644
--- a/src/test/regress/expected/float8.out
+++ b/src/test/regress/expected/float8.out
@@ -1,7 +1,7 @@
--
-- FLOAT8
--
-CREATE TABLE FLOAT8_TBL(f1 float8);
+CREATE TABLE FLOAT8_TBL(f1 float8) DISTRIBUTE BY REPLICATION;
INSERT INTO FLOAT8_TBL(f1) VALUES (' 0.0 ');
INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30 ');
INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84');
diff --git a/src/test/regress/sql/float8.sql b/src/test/regress/sql/float8.sql
index 5d6c103afe..668653eb44 100644
--- a/src/test/regress/sql/float8.sql
+++ b/src/test/regress/sql/float8.sql
@@ -2,7 +2,7 @@
-- FLOAT8
--
-CREATE TABLE FLOAT8_TBL(f1 float8);
+CREATE TABLE FLOAT8_TBL(f1 float8) DISTRIBUTE BY REPLICATION;
INSERT INTO FLOAT8_TBL(f1) VALUES (' 0.0 ');
INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30 ');