create_index test fails when synchronous_commit = off @ master - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject create_index test fails when synchronous_commit = off @ master
Date
Msg-id CAJ7c6TPJNof1Q+vJsy3QebgbPgXdu2ErPvYkBdhD6_Ckv5EZRg@mail.gmail.com
Whole thread Raw
Responses Re: create_index test fails when synchronous_commit = off @ master  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi hackers,

I noticed that create_index test (make installcheck) fails on my laptop because different query plans are chosen:

-                      QUERY PLAN
--------------------------------------------------------
- Index Only Scan using tenk1_unique1 on tenk1
-   Index Cond: (unique1 = ANY ('{1,42,7}'::integer[]))
-(2 rows)
+                            QUERY PLAN
+-------------------------------------------------------------------
+ Sort
+   Sort Key: unique1
+   ->  Bitmap Heap Scan on tenk1
+         Recheck Cond: (unique1 = ANY ('{1,42,7}'::integer[]))
+         ->  Bitmap Index Scan on tenk1_unique1
+               Index Cond: (unique1 = ANY ('{1,42,7}'::integer[]))
+(6 rows)

...

-                      QUERY PLAN
--------------------------------------------------------
- Index Only Scan using tenk1_thous_tenthous on tenk1
-   Index Cond: (thousand < 2)
-   Filter: (tenthous = ANY ('{1001,3000}'::integer[]))
-(3 rows)
+                                      QUERY PLAN
+--------------------------------------------------------------------------------------
+ Sort
+   Sort Key: thousand
+   ->  Index Only Scan using tenk1_thous_tenthous on tenk1
+         Index Cond: ((thousand < 2) AND (tenthous = ANY ('{1001,3000}'::integer[])))
+(4 rows)

Investigation showed that it happens only with `synchronous_commit = off`. Only the master branch is affected, starting from cc50080a82. This is a debug build. I'm running MacOS Monterey 12.2.1 @ x64.

I didn't investigate further. Do we assume that `make installcheck` suppose to pass with a different postgresql.conf options?

--
Best regards,
Aleksander Alekseev

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: PATCH: add "--config-file=" option to pg_rewind
Next
From: Daniel Gustafsson
Date:
Subject: Re: Patch a potential memory leak in describeOneTableDetails()