Re: [HACKERS] Checkpoint request failed on version 8.2.1.

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Zeugswetter Andreas ADI SD <ZeugswetterA(at)spardat(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Patrick Earl <patearl(at)patearl(dot)net>, pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Checkpoint request failed on version 8.2.1.
Date: 2007-01-12 14:28:51
Message-ID: 20070112142851.GB6561@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Fri, Jan 12, 2007 at 10:49:53AM +0100, Zeugswetter Andreas ADI SD 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.
> This seems to be what we want.
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/
> fs/createfile.asp
>
> If this fails (see the loop in dirmod.c) we could try to move it to
> the recycle bin with SHFileOperation with FO_DELETE.
>
> It seems the win unlink is not implemented correctly and we need to
> replace it.
> I don't feel easy with the ignore EACCES idea.
>
> Should I try to supply a patch along this line ?

Doesn't sound unreasonable, so yes, let's give it a try at least.

//Magnus

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-01-12 14:31:19 Re: [HACKERS] Checkpoint request failed on version 8.2.1.
Previous Message Tom Lane 2007-01-12 14:16:23 Re: Corrupt database? 8.1/FreeBSD6.0

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2007-01-12 14:31:19 Re: [HACKERS] Checkpoint request failed on version 8.2.1.
Previous Message Tom Lane 2007-01-12 14:16:23 Re: Corrupt database? 8.1/FreeBSD6.0