From: Christoph Berg <myon@debian.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres
Date: Tue, 23 Mar 2021 12:50:29 +0100
Message-ID: <YFnWBYinNf1s0Y6v@msg.df7cb.de> (raw)
In-Reply-To: <E1lJroH-0006Oz-Gb@gemulon.postgresql.org>
References: <E1lJroH-0006Oz-Gb@gemulon.postgresql.org>
Re: Michael Paquier
> Move tablespace path re-creation from the makefiles to pg_regress
>
> Moving this logic into pg_regress fixes a potential failure with
> parallel tests when pg_upgrade and the main regression test suite both
> trigger the makefile rule that cleaned up testtablespace/ under
> src/test/regress. Even if pg_upgrade was triggering this rule, it has
> no need to do so as it uses a different tablespace path. So if
> pg_upgrade triggered the makefile rule for the tablespace setup while
> the main regression test suite ran the tablespace cases, it would fail.
>
> 61be85a was a similar attempt at achieving that, but that broke cases
> where the regression tests require to run under an Administrator
> account, like with Appveyor.
This change broke running the testsuite on an existing PG server, if
server user and pg_regress client user are different. This is one of
the tests exercised by Debian's autopkgtest suite.
Previously I could create the tablespace directory, chown it to
postgres, and fire up pg_regress with the correct options. Now
pg_regress wipes that directory, recreates it, and then the server
can't use it because user "postgres" can't write to it.
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/debia...
Workaround: https://salsa.debian.org/postgresql/postgresql/-/blob/cbc0240bec738b6ab3b61c498825b82c8ff21a70/debia...
Christoph
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: myon@debian.org, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres
In-Reply-To: <YFnWBYinNf1s0Y6v@msg.df7cb.de>
References: <E1lJroH-0006Oz-Gb@gemulon.postgresql.org> <YFnWBYinNf1s0Y6v@msg.df7cb.de>
* 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