Re: headerscheck ccache support

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: headerscheck ccache support
Date: 2025-11-22 08:54:26
Message-ID: CA+hUKG+N9mAmgzNStFdO5anFkCDtDcs4x2fXdnkp4WeaissB_g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 21, 2025 at 11:48 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> Currently, headerscheck and cpluspluscheck are very slow, and they
> defeat use of ccache. I have fixed that, and now they are much faster. :-)
>
> The problem was (I think) that the test files are created in a
> randomly-named directory (`mktemp -d /tmp/$me.XXXXXX`), and this
> directory is named on the compiler command line, which is part of the
> cache key.
>
> My solution is to create the test files in the build directory. For
> example, for src/include/storage/ipc.h I generate
>
> headerscheck_src_include_storage_ipc_h.c (or .cpp)
>
> Now ccache works. (And it's also a bit easier to debug everything with
> this naming.)
>
> The observed speedup on Cirrus CI for headerscheck plus cpluspluscheck
> is from about 1min 20s to only 20s. In local use, the speedups are similar.

+1

I wrote an almost identical patch[1] and then lost it down the back of
the sofa. I was wondering about parallelising it next...

[1] https://www.postgresql.org/message-id/CA%2BhUKGJjQyZUvcu6udk5OKz5rnaF4a_hm5nb_VtZHYMH%2BvsN0g%40mail.gmail.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message cca5507 2025-11-22 08:55:05 [BUG] Incorrect historic snapshot may be serialized to disk during fast-forwarding
Previous Message Thomas Munro 2025-11-22 08:37:38 Re: [PATCH] jit: fix build with LLVM-21