Re: [PATCH] Atomic pgrename on Windows

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: [PATCH] Atomic pgrename on Windows
Дата
Msg-id CAPpHfdsQDBW6A8OYkQC8A+bkPj9JZnC=1BqTZRPzQyK4swUNOg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Atomic pgrename on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] Atomic pgrename on Windows
Список pgsql-hackers
On Tue, Jan 7, 2020 at 9:40 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> > On Tue, Jan 7, 2020 at 7:16 PM Tomas Vondra
> > <tomas.vondra@2ndquadrant.com> wrote:
> >> I don't have access to a Windows machine and my developer experience
> >> with that platform is pretty much nil, but I think this patch makes
> >> sense. It's not an ideal solution, but it's not clear such solution
> >> exists, and an improvement is better than nothing.
>
> > Thank you for your attention to this patch!
>
> FWIW, I don't like this patch much at all.  I too know nothing about
> Windows, but I do *not* like inventing a distinction between "rename"
> and "rename_temp" and expecting all call sites to have to decide
> which one to use.  That's allowing a single platform's implementation
> bugs to dictate our APIs globally; plus it's not clear that every
> call site can know which is more appropriate.

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.


------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Atomic pgrename on Windows
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Removing pg_pltemplate and creating "trustable" extensions