Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Christoph Berg <myon@debian.org>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-03-24T01:08:42Z
Lists: pgsql-hackers
On Tue, Mar 23, 2021 at 12:50:29PM +0100, Christoph Berg wrote:
> I'm working around the problem now by running the tests as user
> "postgres", but does completely break in environments where users want
> to run the testsuite from a separate compilation user but don't have root.
> 
> Old code: https://salsa.debian.org/postgresql/postgresql/-/blob/8b1217fcae3e64155bc35517acbd50c6f166d997/debian/tests/installcheck
> Workaround: https://salsa.debian.org/postgresql/postgresql/-/blob/cbc0240bec738b6ab3b61c498825b82c8ff21a70/debian/tests/installcheck

So you basically mimicked the makefile rule that this commit removed
into your own test suite.  Reverting the change does not really help,
because we'd be back to square one where there would be problems in
parallel runs for developers.  Saying that, I would not mind adding an
option to pg_regress to control if this cleanup code is triggered or
not, say something like --no-tablespace-cleanup?  Then, you could just
pass down the option by yourself before creating your tablespace path
as you wish.
--
Michael

Commits

  1. Avoid creating testtablespace directories where not wanted.

  2. Move tablespace path re-creation from the makefiles to pg_regress