Working on get_dirent_type() reminded me of this thread. I was going
to commit the first of these patches, but then I noticed Andres said
he was planning to, so I'll wait another day. Here they are, with
commit messages but otherwise unchanged from Nathan's v12 except for a
slight comment tweak:
- /* we're only handling directories here, skip if it's
not ours */
+ /* we're only handling directories here, skip if it's not one */
The only hunk I'm having second thoughts about is the following, which
makes unexpected stray files break checkpoints:
- * We just log a message if a file doesn't fit the pattern, it's
- * probably some editors lock/state file or similar...
*/
if (sscanf(snap_de->d_name, "%X-%X.snap", &hi, &lo) != 2)
- {
- ereport(LOG,
+ ereport(ERROR,
(errmsg("could not parse file
name \"%s\"", path)));
Bharath mentioned other places that loop over stat(), but I think
those are places that want stuff we don't already have, like st_size.