Re: get_controlfile() can leak fds in the backend

Поиск
Список
Период
Сортировка
Искать
От
Fabien COELHO
Тема
Re: get_controlfile() can leak fds in the backend
Дата
Msg-id
alpine.DEB.2.21.1902271144590.10851@lancre
Ответ на
Список
Дерево обсуждения
get_controlfile() can leak fds in the backend Michael Paquier <michael@paquier.xyz>
Re: get_controlfile() can leak fds in the backend Joe Conway <mail@joeconway.com>
Re: get_controlfile() can leak fds in the backend Joe Conway <mail@joeconway.com>
Re: get_controlfile() can leak fds in the backend Michael Paquier <michael@paquier.xyz>
Re: get_controlfile() can leak fds in the backend Joe Conway <mail@joeconway.com>
Re: get_controlfile() can leak fds in the backend Michael Paquier <michael@paquier.xyz>
Re: get_controlfile() can leak fds in the backend Joe Conway <mail@joeconway.com>
Re: get_controlfile() can leak fds in the backend Michael Paquier <michael@paquier.xyz>
Re: get_controlfile() can leak fds in the backend Fabien COELHO <coelho@cri.ensmp.fr>
Re: get_controlfile() can leak fds in the backend Andres Freund <andres@anarazel.de>
Re: get_controlfile() can leak fds in the backend Fabien COELHO <coelho@cri.ensmp.fr>
Re: get_controlfile() can leak fds in the backend Michael Paquier <michael@paquier.xyz>
Re: get_controlfile() can leak fds in the backend Andres Freund <andres@anarazel.de>
Re: get_controlfile() can leak fds in the backend Fabien COELHO <coelho@cri.ensmp.fr>
Re: get_controlfile() can leak fds in the backend Andres Freund <andres@anarazel.de>
Re: get_controlfile() can leak fds in the backend Michael Paquier <michael@paquier.xyz>
Re: get_controlfile() can leak fds in the backend Andres Freund <andres@anarazel.de>
Re: get_controlfile() can leak fds in the backend Fabien COELHO <coelho@cri.ensmp.fr>

>> However, while at it, there is also the question of whether the control file
>> should be locked when updated, eg with flock(2) to avoid race conditions
>> between concurrent commands. ISTM that there is currently not such thing in
>> the code, but that it would be desirable.
>
> Shouldn't be necessary - the control file fits into a single page, and
> writes of that size ought to always be atomic. And I also think
> introducing flock usage for this would be quite disproportional.

Ok, fine.

Note that my concern is not about the page size, but rather that as more 
commands may change the cluster status by editing the control file, it 
would be better that a postmaster does not start while a pg_rewind or 
enable checksum or whatever is in progress, and currently there is a 
possible race condition between the read and write that can induce an 
issue, at least theoretically.

-- 
Fabien.

В списке pgsql-hackers по дате отправления
От: Masahiko Sawada
Дата:
От: Andy Fan
Дата:
FAQ