summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2022-03-12 22:04:50 +0000
committerAndres Freund2022-03-12 22:15:25 +0000
commit02fea8fdda6531f34305b445f92f5b62241329b3 (patch)
treee39ff7b54b293c53838c9e2999155ffbe6462003
parente370f100f05d77eec258fb430009c16c0e315065 (diff)
Set synchronous_commit=on in test_setup.sql.
Starting in cc50080a82 create_index test fails when run with synchronous_commit=off. synchronous_commit=off delays when hint bits may be set. Some plans change depending on the number of all-visible pages, which in turn can be influenced by the delayed hint bits. Force synchronous_commit to `on` in test_setup.sql. Not very satisfying, but there's no obvious alternative. Reported-By: Aleksander Alekseev <[email protected]> Author: Andres Freund <[email protected]> Author: Aleksander Alekseev <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/CAJ7c6TPJNof1Q+vJsy3QebgbPgXdu2ErPvYkBdhD6_Ckv5EZRg@mail.gmail.com
-rw-r--r--src/test/regress/expected/test_setup.out7
-rw-r--r--src/test/regress/sql/test_setup.sql8
2 files changed, 15 insertions, 0 deletions
diff --git a/src/test/regress/expected/test_setup.out b/src/test/regress/expected/test_setup.out
index 98e08cb6eb1..a9d0de3deac 100644
--- a/src/test/regress/expected/test_setup.out
+++ b/src/test/regress/expected/test_setup.out
@@ -7,6 +7,13 @@
\getenv dlsuffix PG_DLSUFFIX
\set regresslib :libdir '/regress' :dlsuffix
--
+-- synchronous_commit=off delays when hint bits may be set. Some plans change
+-- depending on the number of all-visible pages, which in turn can be
+-- influenced by the delayed hint bits. Force synchronous_commit=on to avoid
+-- that source of variability.
+--
+SET synchronous_commit = on;
+--
-- Postgres formerly made the public schema read/write by default,
-- and most of the core regression tests still expect that.
--
diff --git a/src/test/regress/sql/test_setup.sql b/src/test/regress/sql/test_setup.sql
index d0a73c473d6..1f3f2f17241 100644
--- a/src/test/regress/sql/test_setup.sql
+++ b/src/test/regress/sql/test_setup.sql
@@ -10,6 +10,14 @@
\set regresslib :libdir '/regress' :dlsuffix
--
+-- synchronous_commit=off delays when hint bits may be set. Some plans change
+-- depending on the number of all-visible pages, which in turn can be
+-- influenced by the delayed hint bits. Force synchronous_commit=on to avoid
+-- that source of variability.
+--
+SET synchronous_commit = on;
+
+--
-- Postgres formerly made the public schema read/write by default,
-- and most of the core regression tests still expect that.
--