Re: headerscheck ccache support
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-25T05:52:42Z
Lists: pgsql-hackers
On 22.11.25 09:54, Thomas Munro wrote: > On Fri, Nov 21, 2025 at 11:48 PM Peter Eisentraut <peter@eisentraut.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 Ah yes, that's about the same idea. The difference is that yours requires specifying TMPDIR on the make invocation. So it wouldn't happen by default for local (non-CI) use. I think I would like an implementation that also worked out of the box locally.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
ci: Run headerscheck and cpluspluscheck in parallel
- 085a531983e2 19 (unreleased) landed
-
headerscheck ccache support
- 40bdd839f52a 19 (unreleased) landed
-
headerscheck: Use LLVM_CPPFLAGS
- d0b7a0b4c8f4 19 (unreleased) landed