Re: Fix DROP TABLESPACE on Windows with ProcSignalBarrier?

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix DROP TABLESPACE on Windows with ProcSignalBarrier?
Date: 2021-03-03 15:18:39
Message-ID: 89A28E71-EDFE-4E6E-8631-9A5B27D5B2E1@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 1 Mar 2021, at 12:54, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:

Based on my (limited) experience with procsignalbarriers I think this patch is
correct; the general rule-of-thumb of synchronizing backend state on barrier
absorption doesn't really apply in this case, literally all we want is to know
that we've hit one interrupt and performed removals.

>> +#if defined(WIN32) || defined(USE_ASSERT_CHECKING)
>>
>> Is the USE_ASSERT_CHECKING clause to exercise the code a more frequent than
>> just on Windows? That could warrant a quick word in the comment if so IMO to
>> avoid confusion.
>
> Note added.

Since there is no way to get make the first destroy_tablespace_directories call
fail on purpose in testing, the assertion coverage may have limited use though?

I don't have a Windows env handy right now, but everything works as expected
when testing this on Linux and macOS by inducing the codepath. Will try to do
some testing in Windows as well.

--
Daniel Gustafsson https://vmware.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2021-03-03 15:18:44 Re: buildfarm windows checks / tap tests on windows
Previous Message Tom Lane 2021-03-03 15:06:03 Re: Increase value of OUTER_VAR