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

From: Christoph Berg <myon(at)debian(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres
Date: 2021-03-23 11:50:29
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

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:


In response to


Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-03-23 15:24:24 pgsql: Avoid possible crash while finishing up a heap rewrite.
Previous Message Peter Eisentraut 2021-03-23 10:51:01 pgsql: pgcrypto: Check for error return of px_cipher_decrypt()

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2021-03-23 12:51:32 Re: pg_upgrade failing for 200+ million Large Objects
Previous Message Drouvot, Bertrand 2021-03-23 11:47:29 Re: Minimal logical decoding on standbys