aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/relcache.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-01-26 22:35:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-01-26 22:35:32 +0000
commitc77f363384c3f4a6bbc73f501d2459e94382a30b (patch)
treec722b460526c687c1ec9c546aed71b52fbcb3cc4 /src/backend/utils/cache/relcache.c
parente0707cbae9cb5360cd044231fda921fffe8095c5 (diff)
downloadpostgresql-c77f363384c3f4a6bbc73f501d2459e94382a30b.tar.gz
postgresql-c77f363384c3f4a6bbc73f501d2459e94382a30b.zip
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.
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r--src/backend/utils/cache/relcache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 797d96ca8ec..fa8e2ac4d7b 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -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