Re: [GENERAL] Checkpoint request failed on version 8.2.1. - Mailing list pgsql-hackers

From Zeugswetter Andreas ADI SD
Subject Re: [GENERAL] Checkpoint request failed on version 8.2.1.
Date
Msg-id E1539E0ED7043848906A8FF995BDA57901AE6E7D@m0143.s-mxs.net
Whole thread Raw
List pgsql-hackers
I wrote:
> > > I find it very unlikely that you would "during normal operations"
end up
> > > in a situation where you would first have permissions to create
files in
> > > a directory, and then lose them.
> > > What could be is that you have a directory where you never had
> > > permissions to create the file in the first place.
> >
> > > Any chance to differentiate between these?
> >
> > The cases we're concerned about involve access to an existing file,
not
> > attempts to create a new one, so I'm not clear what your point is.
>
> I am wondering if we can delete the file by opening it with
> FILE_FLAG_DELETE_ON_CLOSE, and immediately close it again.
> The semantics should be clear if we let the OS delete the
> file after the last handle on it is closed ?
> Until all handles are closed another process can still open it with
> FILE_SHARE_DELETE (according to docs), but not without the flag.

Say the docs, but win2000 gives EACCES :-(

> This seems to be what we want.
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/
fs/createfile.asp

Seems we don't get what we want :-(

> If this fails (see the loop in dirmod.c) we could try to move it to
> the recycle bin with SHFileOperation with FO_DELETE.

This does not seem to work eighter.

Andreas


pgsql-hackers by date:

Previous
From: Stefan Kaltenbrunner
Date:
Subject: Re: [COMMITTERS] pgsql: Stamp major release 8.3.0,
Next
From: Magnus Hagander
Date:
Subject: Re: [GENERAL] Checkpoint request failed on version 8.2.1.