Re: BUG #14999: pg_rewind corrupts control file global/pg_control

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: BUG #14999: pg_rewind corrupts control file global/pg_control
Дата
Msg-id CA+q6zcWeFmGc=uC5CwL7HznL25nCqh0CvepgtyuGQo1duStE+w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14999: pg_rewind corrupts control file global/pg_control  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: BUG #14999: pg_rewind corrupts control file global/pg_control
Список pgsql-bugs
> On 27 February 2018 at 02:24, Michael Paquier <michael@paquier.xyz> wrote:
>
> Note that I am still not completely happy with the
> handling in errno in some newly-added code paths..

It maybe a stupid question, but why do you need to reset errno here? Is it to
avoid its value being carried from previous calls of `open_target_file`? In
this case if you put the code with `errno == EACCESS` under the if condition
`if (dstfd < 0)`, then as far as I remember you should always get relevant
errno. At the same time maybe it's valid to reset `errno` before `open`, like
with `getpriority`:

    For  some system calls and library functions (e.g., getpriority(2)), -1 is
    a valid return on success.  In such cases, a successful return can be
    distinguished from an error return by setting errno to zero before the
    call, and then, if the call returns a status that indicates that an error
    may have occurred, checking to see if errno has a nonzero value.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15095: schema's owner can drop object's in his schema
Следующее
От: Michael Aiello
Дата:
Сообщение: RE: BUG #15091: to_number() returns incorrect value