Обсуждение: Re: Permission denied on fsync / Win32 (was right
> > The error messages refer to the old relfilenode (in 3 out of 3=20 > > occurrences today). >=20 > So it'd seem the problem is with fsync on recently-deleted files. > Is it possible that we are getting EACCES (ERROR_SHARING_VIOLATION > maybe) in the situation where we try to fsync a file that's=20 > 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. //Magnus
"Magnus Hagander" <mha@sollentuna.net> writes: >> 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. regards, tom lane
It happens often enough and the episodes last long enough that grabbing a handle dump while this is going on should be easily done. Regarding the Win32 error code, backend/storage/file/fd.c calls _commit(). http://msdn2.microsoft.com/en-us/library/17618685(VS.80).aspx It looks like it is already using errno to report errors. Will GetLastError() return something useful there? Pete >>> Tom Lane <tgl@sss.pgh.pa.us> 04/18/06 7:35 pm >>> 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.