Re: Tighten error control for OpenTransientFile/CloseTransientFile
gkokolatos@pm.me
From: Georgios Kokolatos <gkokolatos@pm.me>
To: pgsql-hackers@lists.postgresql.org
Cc: Michael Paquier <michael@paquier.xyz>
Date: 2019-03-06T14:54:52Z
Lists: pgsql-hackers
Overall the patch looks good and according to the previous discussion fulfils its purpose.
It might be worthwhile to also check for errors on close in SaveSlotToPath().
pgstat_report_wait_end();
CloseTransientFile(fd);
/* rename to permanent file, fsync file and directory */
if (rename(tmppath, path) != 0)
Commits
-
Tighten use of OpenTransientFile and CloseTransientFile
- 82a5649fb9db 12.0 landed
-
PANIC on fsync() failure.
- 9ccdd7f66e33 12.0 cited