Re: Possible regression in PG18 beta1

From: Sadeq Dousti <msdousti(at)gmail(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Christophe Courtois <christophe(dot)courtois(at)dalibo(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Possible regression in PG18 beta1
Date: 2025-05-18 14:44:40
Message-ID: CADE6Lvg-Kx=t0ahRXuAWz5G7Ey=QaYsHAVOtzKSwBSRkR7Xd1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks, very interesting insights!

Can you try the same test ( with --no-data-checksums) on you mac
> and see if that makes a difference?
>

I disabled checksums on PG18, and retried the tests, with and without
modifying random_page_cost, and for TEMP tables only.

When random_page_cost is the default value (=4), both versions do Seq Scan,
and PG18 is indeed a bit faster (313 ms vs. 347 ms).

However, when random_page_cost = 1.1, both versions do Index Only Scan, and
PG 17.5 is faster (135 ms vs. 152 ms).

Another counter-intuitive part is that when I run "explain" again, both
versions show slower results. (both 170-180 ms)
Using pg_prewarm to load both the table and the index into the shared
buffers does not change anything.

To summarize:
* Test setup works for TEMP table with random_page_cost =
1.1; data-checksums did not play a role
* It's fast initially and slows down on both versions in subsequent runs
* PG 17.5 is faster, but much more noticeably on the first run

I'm now thinking maybe the compilation options for PG 17.5 have been
different. I'm using the default version that comes with Homebrew, but for
PG 18, I compiled it myself. Here are the results for `select version();`
on both:

PostgreSQL 17.5 (Homebrew) on aarch64-apple-darwin24.4.0,
compiled by Apple clang version 17.0.0 (clang-1700.0.13.3), 64-bit

vs.

PostgreSQL 18beta1 on aarch64-darwin, compiled by clang-17.0.0, 64-bit

Best Regards,
Sadeq Dousti

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-05-18 14:46:02 Re: To make pg_dump and pg_restore parallel in processing limited number of LOs
Previous Message Mihail Nikalayeu 2025-05-18 14:36:00 Re: [BUG?] check_exclusion_or_unique_constraint false negative