]> granicus.if.org Git - postgresql/commitdiff
Prevent logging "failed to stat file: success" for temp files
authorMagnus Hagander <magnus@hagander.net>
Sat, 28 Jan 2012 09:01:17 +0000 (10:01 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 28 Jan 2012 09:03:26 +0000 (10:03 +0100)
This was broken in commit bc3347484a7bf9eddb98e4352d84599cae9a31c6, the
addition of statistics counters for temp files.

Reported by Thom Brown

src/backend/storage/file/fd.c

index 6bad6bfe7d26d28d4ae90a67ebd12f6f92f122a0..52d9b6da940cf406f404d364ba1e1cd8634b9e06 100644 (file)
@@ -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);
                }
        }