aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2012-01-28 10:01:17 +0100
committerMagnus Hagander <magnus@hagander.net>2012-01-28 10:03:26 +0100
commit672614cf2137b2a3778c69de8d73770d84790e44 (patch)
tree5311bd9e75fb197134410784488b48964c391371
parenta8b4b84360e5ea145d12d372305b50f6774b0366 (diff)
downloadpostgresql-672614cf2137b2a3778c69de8d73770d84790e44.tar.gz
postgresql-672614cf2137b2a3778c69de8d73770d84790e44.zip
Prevent logging "failed to stat file: success" for temp files
This was broken in commit bc3347484a7bf9eddb98e4352d84599cae9a31c6, the addition of statistics counters for temp files. Reported by Thom Brown
-rw-r--r--src/backend/storage/file/fd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 6bad6bfe7d2..52d9b6da940 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -1128,11 +1128,11 @@ FileClose(File file)
vfdP->fileName,
(unsigned long) filestats.st_size)));
}
- else
- {
- errno = stat_errno;
- elog(LOG, "could not stat file \"%s\": %m", vfdP->fileName);
- }
+ }
+ else
+ {
+ errno = stat_errno;
+ elog(LOG, "could not stat file \"%s\": %m", vfdP->fileName);
}
}