Set synchronous_commit=on in test_setup.sql.
authorAndres Freund <andres@anarazel.de>
Sat, 12 Mar 2022 22:04:50 +0000 (14:04 -0800)
committerAndres Freund <andres@anarazel.de>
Sat, 12 Mar 2022 22:15:25 +0000 (14:15 -0800)
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 <aleksander@timescale.com>
Author: Andres Freund <andres@anarazel.de>
Author: Aleksander Alekseev <aleksander@timescale.com>
Discussion: https://www.postgresql.org/message-id/flat/CAJ7c6TPJNof1Q+vJsy3QebgbPgXdu2ErPvYkBdhD6_Ckv5EZRg@mail.gmail.com

src/test/regress/expected/test_setup.out
src/test/regress/sql/test_setup.sql

index 98e08cb6eb16c4245c20466d253b7f5dc2356586..a9d0de3deac87a41e13a8dc9a27d4d289762b108 100644 (file)
@@ -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.
 --
index d0a73c473d658fd321a2bce17aaf20609e7a454e..1f3f2f172411deadc15519425fb93691139c0ba9 100644 (file)
@@ -9,6 +9,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.