Re: initdb caching during tests

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@gmail.com>, Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2023-08-05T20:58:38Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> Times for running all tests under meson, on my workstation (20 cores / 40
> threads):

> cassert build -O2:

> Before:
> real	0m44.638s
> user	7m58.780s
> sys	2m48.773s

> After:
> real	0m38.938s
> user	2m37.615s
> sys	2m0.570s

Impressive results.  Even though your bottom-line time doesn't change that
much, the big reduction in CPU time should translate to a nice speedup
on slower buildfarm animals.

(Disclaimer: I've not read the patch.)

			regards, tom lane



Commits

  1. Don't clean initdb files on template creation failure

  2. Avoid non-POSIX cp flags

  3. Use "template" data directory in tests

  4. tests: Consistently use pg_basebackup -cfast --no-sync to accelerate tests.