Incorrect errno used with %m for backend code

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Incorrect errno used with %m for backend code
Дата
Msg-id 20180622061535.GD5215@paquier.xyz
обсуждение исходный текст
Ответы Re: Incorrect errno used with %m for backend code  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Re: Incorrect errno used with %m for backend code  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi all,

I have been reviewing the use of errno in the backend code when %m is
used in the logs, and found more places than when I looked at improving
the error messages for read() calls which bloat the errno value because
of intermediate system calls.  As the problem is separate and should be
back-patched, I have preferred beginning a new thread.

A couple of places use CloseTransientFile without bothering much that
this can overwrite errno.  I was tempted in keeping errno saved and kept
if set to a non-zero value, but refrained from doing so as some callers
may rely on the existing behavior, and the attached shows better the
intention.

Attached is a patch with everything I have spotted.  Any opinions or
thoughts in getting this back-patched?

Thanks,
--
Michael

Вложения

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

Предыдущее
От: Jeevan Chalke
Дата:
Сообщение: Re: Server crashed with TRAP: FailedAssertion("!(parallel_workers >0)" when partitionwise_aggregate true.
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: PANIC during crash recovery of a recently promoted standby