pg_regress cleans up tablespace twice.

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: pg_regress cleans up tablespace twice.
Date: 2020-02-19 05:25:19
Message-ID: 20200219.142519.437573253063431435.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello.

I saw a failure of vcregress check with the following message several
times, on a machine under a heavy load and maybe with realtime virus
scanning.

> pg_regress: could not create directory ".../testtablespace": Permission denied.

I found that pg_regress repeats the sequence
rmtree(tablespace)->make_directory(tablespace) twice under
initialize_environment. So it should be THE DELETE_PENDING. It is
because the code is in convert_sourcefiles_in, which is called
succssively twice in convert_sourcefiles.

But in the first place it comes from [1] and the comment says:

> * XXX it would be better if pg_regress.c had nothing at all to do with
> * testtablespace, and this were handled by a .BAT file or similar on
> * Windows. See pgsql-hackers discussion of 2008-01-18.

Is there any reason not to do that in vcregress.pl? I think the
commands other than 'check' don't needs this.

[1] https://www.postgresql.org/message-id/11718.1200684807%40sss.pgh.pa.us

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
vcregress_cleanup_testtablespace.patch text/x-patch 1.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-02-19 05:42:18 Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Previous Message Tom Lane 2020-02-19 04:39:28 Re: Resolving the python 2 -> python 3 mess