Re: Don't choke on files that are removed while pg_rewind runs.

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Don't choke on files that are removed while pg_rewind runs.
Дата
Msg-id 20200713075629.GA10826@paquier.xyz
обсуждение исходный текст
Ответ на Re: Don't choke on files that are removed while pg_rewind runs.  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Ответы Re: Don't choke on files that are removed while pg_rewind runs.  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
On Mon, Jul 13, 2020 at 03:59:56PM +0900, Masahiko Sawada wrote:
> On Mon, 13 Jul 2020 at 15:34, Daniel Gustafsson <daniel@yesql.se> wrote:
>> Yeah, I agree with that, seems like the call should've been PQgetisnull(res, i, 1);
>> to match the loop.
>
> +1

Good catch, Justin.  There is a second thing here.  The second column
matches with the file size, so if its value is NULL then atol() would
just crash first.  I think that it would be more simple to first check
if the file size is NULL (isdir and link_target would be also NULL,
but just checking for the file size is fine), and then assign the
result values, like in the attached.  Any thoughts?
--
Michael

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: OpenSSL 3.0.0 compatibility
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Don't choke on files that are removed while pg_rewind runs.