Skip site navigation (1) Skip section navigation (2)

Re: Permission denied on fsync / Win32 (was right

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Peter Brant" <Peter(dot)Brant(at)wicourts(dot)gov>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Permission denied on fsync / Win32 (was right
Date: 2006-04-18 18:45:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
> >> Is it possible that we are getting EACCES (ERROR_SHARING_VIOLATION
> >> maybe) in the situation where we try to fsync a file that's been 
> >> unlinked but isn't fully gone yet due to open handles?
> > I think that sounds "reasonable". Not as in a reasonable 
> thing to do, 
> > but as a reasonable thing to expect from the win32 api.
> Probably be good if someone can experimentally confirm that 
> (and confirm exactly which underlying Win32 error code it is) 
> before we think about how to fix it.

Hmm. A very simple test that's basically:

A: open file (using win32_open copied from src/port)
A: fsync file (success)
B: delete file
A: fsync file again (success)

So it must be a different scenario that causes it.

Per the MSDN docs
html/_crt__commit.asp) the result code sohuld be EBADF and nothing else
- which is clearly not what's happening :-(

Because we are talking about checking the output from _commit(), right?
(being fsync() redefined)



pgsql-bugs by date

Next:From: Peter BrantDate: 2006-04-18 18:49:45
Subject: Re: Permission denied on fsync / Win32 (was right
Previous:From: Tom LaneDate: 2006-04-18 18:44:32
Subject: Re: [Win32] Problem with rename()

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group