Re: fsync with sync, and Win32 unlink

Поиск
Список
Период
Сортировка
От Claudio Natoli
Тема Re: fsync with sync, and Win32 unlink
Дата
Msg-id A02DEC4D1073D611BAE8525405FCCE2B55F37B@harris.memetrics.local
обсуждение исходный текст
Список pgsql-hackers-win32
> Hmm ... so you're suggesting that if every open() that can ever open a
> Postgres file is replaced by this win32_open() code, then unlink()ing
> the file will behave as per Unix custom?

AFAICS, this is correct. [Strictly, only those files we may later unlink()
whilst the file remains held open elsewhere, such as those from
BasicOpenFile, but a global replacement of open ala pg/ulink would suffice]


> Presumably, if we miss even one open(), or some random admin is more'ing a
file
> when we try to delete it, the database crashes?

Depending on how the external program open()'d the files, it could lock the
unlink()'ing backend until the program released the offending file handle
(assuming we retain dirmod.c).


> This strikes me as pretty damn fragile, but then every part of Windoze
> is pretty damn fragile.  If it works as you say then it's good enough
> for me, because I'm not ever going to buy into the premise that Postgres
> on Windows is a production-grade setup.

It passes the regression tests, and every other test I've got to throw at
it.

I'll play with it a bit more, and pending any major flaws I'll submit a
patch in the near future.

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>

В списке pgsql-hackers-win32 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: fsync with sync, and Win32 unlink
Следующее
От: Claudio Natoli
Дата:
Сообщение: Re: fsync with sync, and Win32 unlink