Hi, On 2022-01-19 11:54:01 -0500, Tom Lane wrote: > Andres Freund <and...@anarazel.de> writes: > > On 2022-01-18 13:40:40 -0800, Andres Freund wrote: > >> Maybe we really should do at least the most simplistic caching for > >> initdbs, by > >> doing one initdb as part of the creation of temp_install. Then > >> Cluster::init > >> would need logic to only use that if $params{extra} is empty. > > > I hacked this together. And the wins are bigger than I thought. > > Me too ;-). As I remarked earlier, I'd tried this once before and > gave up because it didn't seem to be winning much. But that was > before we had so many initdb's triggered by TAP tests, I think.
What approach did you use? Do you have a better idea than generating tmp_install/initdb_template? I for a bit wondered whether initdb should do this internally instead. But it seemed more work than I wanted to tackle. The bit in the patch about generating initdb_template in Install.pm definitely needs to be made conditional, but I don't precisely know on what. The buildfarm just calls it as perl install.pl "$installdir > So this looks like it'll be a nice win for low-end hardware, too. Nice! > (Note that all four runs have the "fsync = on" removed from > 008_fsm_truncation.pl.) I assume you're planning on comitting that? Greetings, Andres Freund