Re: stats test on Windows is now failing repeatably? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: stats test on Windows is now failing repeatably?
Date
Msg-id 27555.1156950144@sss.pgh.pa.us
Whole thread Raw
In response to Re: stats test on Windows is now failing repeatably?  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: stats test on Windows is now failing repeatably?
List pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> I tested HEAD on Windows and saw some Windows-specific logs.

> LOG:  Windows fopen("base/16384/pg_internal.init","rb") failed: code 2, errno 2
> LOG:  Windows fopen("global/pgstat.stat","rb") failed: code 32, errno 13

> The code 2 means ERROR_FILE_NOT_FOUND, "The system cannot find the file
> specified." and the code 32 means ERROR_SHARING_VIOLATION, "The process
> cannot access the file because it is being used by another process."

The first of those is probably normal operation --- we remove
pg_internal.init whenever it is out-of-date.  The second is bad though.

> We use the tmpfile-and-rename trick on both pg_internal.init and pgstat.stat.
> Are there any incompatible behavior in the trick between POSIX and Windows?

It looks to me like we have implemented Windows' FILE_SHARE_DELETE flag
for open() calls but not for fopen().  Isn't this a problem?  We do use
fopen() for stuff like pgstat.stat.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [PATCHES] Backend SSL configuration enhancement
Next
From: Andrew Dunstan
Date:
Subject: Re: Coding style for emacs