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

Commit 02fea8f

Browse files
committed
Set synchronous_commit=on in test_setup.sql.
Starting in cc50080 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
1 parent e370f10 commit 02fea8f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/test/regress/expected/test_setup.out

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
\getenv dlsuffix PG_DLSUFFIX
88
\set regresslib :libdir '/regress' :dlsuffix
99
--
10+
-- synchronous_commit=off delays when hint bits may be set. Some plans change
11+
-- depending on the number of all-visible pages, which in turn can be
12+
-- influenced by the delayed hint bits. Force synchronous_commit=on to avoid
13+
-- that source of variability.
14+
--
15+
SET synchronous_commit = on;
16+
--
1017
-- Postgres formerly made the public schema read/write by default,
1118
-- and most of the core regression tests still expect that.
1219
--

src/test/regress/sql/test_setup.sql

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99

1010
\set regresslib :libdir '/regress' :dlsuffix
1111

12+
--
13+
-- synchronous_commit=off delays when hint bits may be set. Some plans change
14+
-- depending on the number of all-visible pages, which in turn can be
15+
-- influenced by the delayed hint bits. Force synchronous_commit=on to avoid
16+
-- that source of variability.
17+
--
18+
SET synchronous_commit = on;
19+
1220
--
1321
-- Postgres formerly made the public schema read/write by default,
1422
-- and most of the core regression tests still expect that.

0 commit comments

Comments
 (0)