Re: stats test on Windows is now failing repeatably?

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: stats test on Windows is now failing repeatably?
Date: 2006-08-30 15:07:17
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA355F0@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > 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.

That definitely sounds like a problem, there is no reason why the issue
shouldn't occur for fopen(). Do you want to work up a patch for that
based on open(), or do you want me to take a look at it?

//Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-08-30 15:09:03 Re: Autovacuum on by default?
Previous Message Andrew Dunstan 2006-08-30 15:06:01 Re: Coding style for emacs