Re: pgsql: Use "template" data directory in tests

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Use "template" data directory in tests
Date: 2023-08-28 00:36:29
Message-ID: ZOvsDWM3Rsdnx1xc@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-08-28 03:54:08 pgsql: Remove dead code in DecodeInterval()
Previous Message Peter Eisentraut 2023-08-27 18:32:43 pgsql: Update list of acknowledgments in release notes