Re: headerscheck ccache support

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
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-28 13:29:04
Message-ID: 202511281325.pgtrvr42m4d3@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025-Nov-28, Peter Eisentraut wrote:

> Here is another patch set. I have made some tweaks to address the issue you
> raise, and I took some code and inspiration from Thomas Munro's patch. The
> solution I chose is to create a temporary subdirectory in the build
> directory, and create the test files in there. That way the trap can just
> blow away the directory, as before.

I tried with all patches applied, and it seems to work okay -- the
header compiles are all cached after the first pass, according to
ccache --show-stats.

> Another approach I had in mind for some time is to just write out a makefile
> with the test compile commands, and run that with make -j. Demo patch
> attached. (I'm not seriously proposing this. For one thing, we probably
> wouldn't want to introduce a dependency on make. But you could probably
> write an equivalent ninja.build file.)
>
> But this doesn't seem to buy very much. The overhead of the shell script to
> write out the test files appears to become significant compared the the
> actual compile commands.

Really? I tried editing the make line to have -j8 (your patch doesn't
have a -j switch at all there) and it runs in 4s instead of 12s on my
laptop, which I would call a significant win.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
#error "Operator lives in the wrong universe"
("Use of cookies in real-time system development", M. Gleixner, M. Mc Guire)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-11-28 13:39:33 Re: Cleanup shadows variable warnings, round 1
Previous Message Kirill Reshke 2025-11-28 13:28:15 Re: Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors