@@ -75,17 +75,20 @@ recurse_dir(const char *datadir, const char *parentpath,
75
75
76
76
if (lstat (fullpath ,& fst )< 0 )
77
77
{
78
- pg_log (PG_WARNING ,"could not stat file \"%s\": %s" ,
79
- fullpath ,strerror (errno ));
80
-
81
- /*
82
- * This is ok, if the new master is running and the file was just
83
- * removed. If it was a data file, there should be a WAL record of
84
- * the removal. If it was something else, it couldn't have been
85
- * critical anyway.
86
- *
87
- * TODO: But complain if we're processing the target dir!
88
- */
78
+ if (errno == ENOENT )
79
+ {
80
+ /*
81
+ * File doesn't exist anymore. This is ok, if the new master
82
+ * is running and the file was just removed. If it was a data
83
+ * file, there should be a WAL record of the removal. If it
84
+ * was something else, it couldn't have been anyway.
85
+ *
86
+ * TODO: But complain if we're processing the target dir!
87
+ */
88
+ }
89
+ else
90
+ pg_fatal ("could not stat file \"%s\": %s" ,
91
+ fullpath ,strerror (errno ));
89
92
}
90
93
91
94
if (parentpath )