Re: Intermittent pg_ctl failures on Windows

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Intermittent pg_ctl failures on Windows
Дата
Msg-id 20190718053834.GG1416@paquier.xyz
обсуждение исходный текст
Ответ на Re: Intermittent pg_ctl failures on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Intermittent pg_ctl failures on Windows  (Жарков Роман <r.zharkov@postgrespro.ru>)
Список pgsql-hackers
On Wed, Jul 17, 2019 at 09:51:48AM -0400, Tom Lane wrote:
> r.zharkov@postgrespro.ru writes:
>> On Windows systems we cannot handle ERROR_DELETE_PENDING because
>> GetLastError() returns ERROR_ACCESS_DENIED instead.
>> So we rename the lock files before delete them.
>
> This seems improbably broken/stupid.  Also, I've not seen any buildfarm
> failures that would match this; it's always pg_ctl complaining not the
> postmaster.

Oh, it is.  A lot.  And this has been discussed a couple of times
across multiple threads on -bugs and/or -hackers.  I think that
Windows just lacks a way to detect reliably if a file is pending for
deletion or not, and there is no way that we are going to enforce
blindly a ERROR_DELETE_PENDING when we see EACCES.  One code path
which is impacted by that is our wrapper for stat() for the win32
port...  For now I'd rather believe that what the OS tells us is true,
in which case here it is plain wrong, but well.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_receivewal documentation
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs