Andres Freund <and...@anarazel.de> writes: > I've occasionally pondered caching initdb results and reusing them across > tests - just the locking around it seems a bit nasty, but perhaps that could > be done as part of the tmp_install step. Of course, it'd need to deal with > different options etc...
I'd actually built a prototype to do that, based on making a reference cluster and then "cp -a"'ing it instead of re-running initdb. I gave up when I found than on slower, disk-bound machines it was hardly any faster. Thinking about it now, I wonder why not just re-use one cluster for many tests, only dropping and re-creating the database in which the testing happens. regards, tom lane