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:13:00 |
Message-ID: | A02DEC4D1073D611BAE8525405FCCE2B55F376@harris.memetrics.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 |
Tom Lane wrote:
> Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
> > Tom, can you hold off on "unlink handling" part of the
> > implementation, at least for a few days?
>
> Love to ;-)
Figured this wouldn't cause you too much grief :-)
> > I'm testing a patch right now to work around this very
> > issue (involves, under win32, replacing _open() with CreateFile, which
> > accepts parameters to allow deletion of the held file.
> > Initial testing looks good, but it'll need community review).
>
> However, I don't see exactly how that can win?
Why not?
In any case, attached is the code I've currently got. Comments/criticisms
most welcome.
FWIW, replacing the call to open() (strictly, _open() under win32) in
BasicOpenFile (fd.c) with this win32_open() allows the regression tests to
pass through the transactions, foreign_key, and alter_table tests without
locking up (which is what they currently do). All in all, the change looks
sound, however I make no guarantee that a corner case has not been missed.
[One thing I have noticed is that database directories don't get removed
when dropping the db, leaving a whole stack of empty directories when
running the regression tests in a loop. However, this could very well be
pre-existing.]
Cheers,
Claudio
---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>
Attachment | Content-Type | Size |
---|---|---|
win32_open.c | application/octet-stream | 2.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-12 23:52:31 | Re: fsync with sync, and Win32 unlink |
Previous Message | Claudio Natoli | 2004-03-12 23:02:12 | Re: initdb problen |