Re: Win32 rename()/unlink() questions - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: Win32 rename()/unlink() questions
Date
Msg-id 20020920080949.H40440-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Win32 rename()/unlink() questions  (Mike Mascari <mascarm@mascari.com>)
List pgsql-hackers
On Fri, 20 Sep 2002, Mike Mascari wrote:

> Bruce Momjian wrote:
> > I don't think we are not going to be supporting Win9X so there isn't an
> > issue there.  We will be supporting Win2000/NT/XP.
> >
> > I don't understand FILE_SHARE_DELETE.  I read the description at:
> >
> >     http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createfile.asp
> >
> > but I don't understand it:
> >
> >     FILE_SHARE_DELETE - Windows NT/2000/XP: Subsequent open operations on
> >     the object will succeed only if delete access is requested.
>
> I think that's a rather poor description. I think it just means
> that if the file is opened once via CreateFile() with
> FILE_SHARE_DELETE, then any subsequent CreateFile() calls will
> fail unless they too have FILE_SHARE_DELETE. In other words, if
> one of us can delete this file while its open, any of us can.

The question is, what happens if two people have the file open
and one goes and tries to delete it?  Can the other still read
from it?



pgsql-hackers by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: SCSI Error
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] timestamp parse error