From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Reini Urban <rurban(at)x-ray(dot)at> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: APR 1.0 released |
Date: | 2004-09-08 10:26:46 |
Message-ID: | 200409081026.i88AQk714136@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
OK, care to submit a patch. As I remember the fix for rename/unlink
also includes how the file is opened with flags. Anyway, we spent a lot
of time on this so you will have to go back in the archvies to find it
and determine how it can be improved.
Your track record for Cygwin diagnosis isn't 100%. I am going to need
complete research before changing anything at this point in beta.
---------------------------------------------------------------------------
Reini Urban wrote:
> Bruce Momjian schrieb:
> > I looked at the APR code to get some ideas for the Win32 port. Some of
> > the ideas were good, but in other places like rename they didn't do very
> > well we were better off doing it ourselves and getting it right.
> >
> > I remember looking at their code to fix the rename/unlink while the file
> > is open problem, and they didn't seem to have a fix for that so we
> > developed our own method that works like Unix.
>
> sorry, but your rename doesn't work on cygwin. maybe it works with mingw.
>
> cygwin has it's own and working way of doing rename's.
> maybe you should have looked at the cygwin sources instead.
> (src/winsup/cygwin/syscalls.cc)
>
> first doing a WinAPI MoveFileEx and then after a failure trying the
> cygwin version, which will also try its own MoveFile loop, will not
> work. they are conflicting.
>
> same with unlink, but at least the mingw and cygwin unlink versions
> don't conflict here. here you don't stack two conflicting loops together.
> nevertheless cygwin's unlink is much better than pgunlink in case of
> locking problems. it does its own sort of delayed removal then.
>
> IMHO port/dirmod.c is a dirty and half-baked hack, which works for mingw
> only.
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | David Garamond | 2004-09-08 10:35:42 | Re: FYI: Fujitsu |
Previous Message | Christopher Kings-Lynne | 2004-09-08 08:55:41 | Re: FYI: Fujitsu |