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

Re: fsync with sync, and Win32 unlink

From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
Cc: 'Bruce Momjian' <pgman(at)candle(dot)pha(dot)pa(dot)us>,PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgreSQL(dot)org>
Subject: Re: fsync with sync, and Win32 unlink
Date: 2004-03-12 23:59:57
Message-ID: A02DEC4D1073D611BAE8525405FCCE2B55F378@harris.memetrics.local (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32

Tom Lane wrote:
> Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
> > Tom Lane wrote:
> >> However, I don't see exactly how that can win?
> > Why not?
> More like "why?".  The problem we have is with making sure that existing
> files we don't want anymore will go away in a timely fashion.  I don't
> see how it helps to modify file creation to allow overwrite.  We are not
> (in most deletion cases) expecting anyone to re-create that file later.
> [snip]
> So unless I'm totally misunderstanding where you mean to use 
> this code, I don't see the point.

I think you might be.

I'm not suggesting that we modify file creation to allow overwrite. The
suggestion is that we modify file creation to allow delete. Win32 _open()
call opens files in a manner that does not allow them to be deleted when
held by another process. However, "replacing" the open() call with an
orchestrated call to CreateFile/_open_osfhandle appears to give us exactly
that behaviour we expect from open() under *nix (specifically, being able to
unlink a file held by another process).

Am we talking at cross-purposes here?


Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 


pgsql-hackers-win32 by date

Next:From: Tyler MitchellDate: 2004-03-13 00:11:01
Subject: no rule to make target dynloader.o
Previous:From: Tom LaneDate: 2004-03-12 23:52:31
Subject: Re: fsync with sync, and Win32 unlink

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