Re: CI slowdown due to PG_TEST_INITDB_EXTRA_OPTS

From: Andres Freund <andres(at)anarazel(dot)de>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Subject: Re: CI slowdown due to PG_TEST_INITDB_EXTRA_OPTS
Date: 2026-07-21 00:56:37
Message-ID: chngawugucibpfyyqxdt2ttpqwdtpyndlejbvvuqb7obtz65ps@lhzgakwmooos
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-07-20 23:47:16 +0200, Jelte Fennema-Nio wrote:
> On Sat, 18 Jul 2026 at 20:48, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > It looks like any one job mostly uses the same value of
> > PG_TEST_INITDB_EXTRA_OPTS. Could we record what was used to set up
> > the template, and allow using it if that matches?

That seems like a somewhat complicated mechanism. But mainly I feel like it's
a workaround around the config-customization-via-env-var having to go through
exactly one file. None of the uses of PG_TEST_INITDB_EXTRA_OPTS in CI actually
needs it to be an initdb option, it's just a way to set configuration options
for the server via an environment variable.

I wonder if the best thing would be to add PG_TEST_SERVER_POSTGRES_OPTS or
such, which Cluster.pm and regress.c would add to postgresql.conf.

> For MacOS I see basically no improvement though, I guess that's probably
> because the debug_xxx options actually incur significant overhead. Maybe
> it's worth trying to move them to one of the faster runs. But that seems
> like a separate discussion.

Hm. I see very consistent improvements locally on an m4 mac mini. On CI the
runtime of the macos job is crazily variable, e.g. the last few runs on master
had these runtimes for macos' "Test world":
14m59s, 17m24s, 12m13s, 18m38s, 13m15s, 12m22s

No idea what causes that degree of variability. I guess the effect of
neighboring tasks is the most likely explanation...

In contrast, meson-64 has these "Test world" times for the same commits:
19m46s, 19m40s, 18m38s, 18m14s, 19m15s, 18m23s

(meson-64 is slow due to asan)

With the configuration for meson-64 instead done via:

- name: 'configure extra opts'
run: |
echo "io_method=io_uring" >> src/tools/ci/pg_ci_base.conf
cat src/tools/ci/pg_ci_base.conf

I see ~13m30s for meson-64.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Masahiko Sawada 2026-07-21 00:42:03 Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation