Re: [PATCH] Atomic pgrename on Windows

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] Atomic pgrename on Windows
Дата
Msg-id CAB7nPqQB-BS_QQ7aJW9sp96yrRQ+4_iRBHgUeZhLU63O1xWmKw@mail.gmail.com
обсуждение исходный текст
Ответ на [PATCH] Atomic pgrename on Windows  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: [PATCH] Atomic pgrename on Windows
Re: [PATCH] Atomic pgrename on Windows
Список pgsql-hackers
On Mon, Nov 27, 2017 at 3:28 PM, Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> Attached patch atomic-pgrename-windows-1.patch fixes this problem.  It
> appears to be possible to atomically replace file on Windows – ReplaceFile()
> does that.  ReplaceFiles() requires target file to exist, this is why we
> still need to call MoveFileEx() when it doesn't exist.

Do you think that it could be safer to unlink the target file first
with pgunlink()? This way you make sure that the target file is
removed and not locked. This change makes me worrying about the
introduction of more race conditions.

> This patch is based on work of Victor Spirin who was asked by Postgres Pro
> to research this problem.

Victor has no community account so his name cannot be registered as a
co-author of the patch. I have added your name though.
--
Michael


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Transactions involving multiple postgres foreign servers
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Timeline ID in backup_label file