Re: [PATCH] Atomic pgrename on Windows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Atomic pgrename on Windows
Дата
Msg-id 20618.1578427479@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Atomic pgrename on Windows  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: [PATCH] Atomic pgrename on Windows
Список pgsql-hackers
Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> I'm not sure issue we faced is really about single platform.  TBH, the
> assumptions we place to rename function is very strict.  We assume
> rename works atomically on system crash.  And we indirectly assume it
> can work concurrently as least with file readers.  The both are
> probably true for Linux with most popular filesystems.  But we do
> support pretty many platforms.  I think the issue we didn't
> investigate rename properties well on all of them.  But if we do, it
> might happen some assumptions are wrong on multiple platforms.
> Windows is just used busy enough to spot the problem.

Well, atomic rename is required by POSIX.  True, we have found bugs
related to that in one or two Unix-ish platforms.  But nobody
is going to deny that those are OS bugs that the OS ought to fix,
rather than accepted behaviors that applications have to find
some way to work around.  I'm not pleased with the idea that
Windows' deficiencies in this area should result in kluges all over
our code.  I think we should stick to the autoconf recommendation:

    Autoconf follows a philosophy that was formed over the years by
    those who have struggled for portability: isolate the portability
    issues in specific files, and then program as if you were in a
    Posix environment.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: tableam vs. TOAST
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: xact_start for walsender & logical decoding not updated