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

Lines changed: 7 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy