Re: Tighten error control for OpenTransientFile/CloseTransientFile
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Joe Conway <mail@joeconway.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-02T00:40:22Z
Lists: pgsql-hackers
On Fri, Mar 01, 2019 at 05:05:54PM -0500, Joe Conway wrote: > Seems like it would be better to modify the arguments to > CloseTransientFile() to include the filename being closed, errorlevel, > and fail_on_error or something similar. Then all the repeated ereport > stanzas could be eliminated. Sure. Now some code paths close file descriptors without having at hand the file name, which would mean that we'd need to pass NULL as argument in this case. That's not really elegant in my opinion. And having a consistent mapping with the system's close() is not really bad to me either.. -- Michael
Commits
-
Tighten use of OpenTransientFile and CloseTransientFile
- 82a5649fb9db 12.0 landed
-
PANIC on fsync() failure.
- 9ccdd7f66e33 12.0 cited