From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Use "template" data directory in tests
Date: Mon, 28 Aug 2023 09:36:29 +0900
Message-ID: <ZOvsDWM3Rsdnx1xc@paquier.xyz> (raw)
In-Reply-To: <E1qZIW0-000jJR-4s@gemulon.postgresql.org>
References: <E1qZIW0-000jJR-4s@gemulon.postgresql.org>
Hi Andres,
On Thu, Aug 24, 2023 at 10:09:20PM +0000, Andres Freund wrote:
> Use "template" data directory in tests
>
> When running all (or just many) of our tests, a significant portion of both
> CPU time and IO is spent running initdb. Most of those initdb runs don't
> specify any options influencing properties of the created data directory.
>
> Avoid most of that overhead by creating a "template" data directory, alongside
> the temporary installation. Instead of running initdb, pg_regress and tap
> tests can copy that data directory. When a tap test specifies options to
> initdb, the template data directory is not used. That could be relaxed for
> some options, but it's not clear it's worth the effort.
This commit is saving a lot of cycles here. Thanks for doing that!
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, andres@anarazel.de, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Use "template" data directory in tests
In-Reply-To: <ZOvsDWM3Rsdnx1xc@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox