Re: Incorrect errno used with %m for backend code
Ashutosh Sharma <ashu.coek88@gmail.com>
From: Ashutosh Sharma <ashu.coek88@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@postgresql.org>
Date: 2018-06-22T10:15:33Z
Lists: pgsql-hackers
On Fri, Jun 22, 2018 at 2:44 PM, Michael Paquier <michael@paquier.xyz> wrote: > On Fri, Jun 22, 2018 at 01:00:45PM +0530, Ashutosh Sharma wrote: >> It seems like in case of few system calls for e.g. write system call, >> errno is not set even if the number of bytes written is smaller than >> the bytes requested and for such cases we explicitly set an errno to >> ENOSPC. Something like this, >> >> /* >> * if write didn't set errno, assume problem is no disk space >> */ >> errno = save_errno ? save_errno : ENOSPC; >> >> Shouldn't we do similar handling in your patch as well or please let >> me know if i am missing something here. > > Yeah, I can see at least three of them in twophase.c. Let's fix those > as well at the same time. Okay, thanks for the confirmation. Few of them are also there in origin.c and snapbuild.c files. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com
Commits
-
Address set of issues with errno handling
- f53ed82b7fee 9.3.24 landed
- 79b5b101f992 9.4.19 landed
- 910e2aca129c 9.5.14 landed
- 7fdf56b0a796 9.6.10 landed
- 6eec6724ff45 10.5 landed
- 6cb3372411fd 11.0 landed