Re: intermittent test failure on Windows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: intermittent test failure on Windows
Date: 2019-10-21 18:58:13
Message-ID: 3023.1571684293@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> writes:
> Bowerbird (Visual Studio 2017 / Windows 10 pro) just had a failure on
> the pg_ctl test :
> <https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&dt=2019-10-21%2011%3A50%3A21>

> I surmise that what's happening here is that the test is trying to read
> current_logfiles while the server is writing it, so there's a race
> condition.

Hmm ... the server tries to replace current_logfiles atomically
with rename(), so this says that rename isn't atomic on Windows,
which we knew already. Previous discussion (cf. commit d611175e5)
implies that an even worse failure condition is possible: the server
might fail to rename current_logfiles.tmp into place, just because
somebody is trying to read current_logfiles. Ugh.

I found a thread about trying to make a really bulletproof rename()
for Windows:

https://www.postgresql.org/message-id/flat/CAPpHfds7dyuGZt%2BPF2GL9qSSVV0OZnjNwqiCPjN7mirDw882tA%40mail.gmail.com

but it looks like we gave up in disgust.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-10-21 19:04:36 Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays
Previous Message Steve Atkins 2019-10-21 18:20:26 Re: jsonb_set() strictness considered harmful to data