Re: Incorrect errno used with %m for backend code

Поиск
Список
Период
Сортировка
От Ashutosh Sharma
Тема Re: Incorrect errno used with %m for backend code
Дата
Msg-id CAE9k0P=-M-aTupoSju91mFpnwfs5AogXX=NUmnMsJ0QuYVNwvQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Incorrect errno used with %m for backend code  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Incorrect errno used with %m for backend code  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Sat, Jun 23, 2018 at 6:43 PM, Michael Paquier <michael@paquier.xyz> wrote:
> On Fri, Jun 22, 2018 at 03:45:33PM +0530, Ashutosh Sharma wrote:
>> Okay, thanks for the confirmation. Few of them are also there in
>> origin.c and snapbuild.c files.
>
> Thanks Ashutosh.  I have been reviewing the whole tree and I found more
> places where this is missing, like rewriteheap.c, reorderbuffer.c or
> pg_basebackup, which gives the attached.
> --

Okay, I too had a quick look into the source code to see if there are
still some places where we could have missed to set an errno to ENOSPC
in case of write system call failure but, couldn't find any such place
in the code. The v2 version of patch looks good to me.

So, to conclude, now, v2 patch fixes two things - 1) It makes ereport
to print a correct error number (the error number that matches with
the error message), 2) It sets the errno to ENOSPC (assuming that the
problem is no disk space) if write system call fails to set an errno.

-- 
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Keeping temporary tables in shared buffers
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: utilities to rebuild commit logs from wal