1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Ensure that close() and fclose() are checked for errors, at least in

cases involving writes.  Per recent discussion about the possibility
of close-time failures on some filesystems.  There is a TODO item for
this, too.
This commit is contained in:
Tom Lane
2004-01-26 22:35:32 +00:00
parent e0707cbae9
commit c77f363384
15 changed files with 155 additions and 56 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.194 2003/12/28 21:57:37 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.195 2004/01/26 22:35:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -3330,7 +3330,8 @@ write_relcache_init_file(void)
MemoryContextSwitchTo(oldcxt);
}
FreeFile(fp);
if (FreeFile(fp))
elog(FATAL, "could not write init file");
/*
* Now we have to check whether the data we've so painstakingly