temporary file. This seems to be a known failure mode under Cygwin,
so we might as well expend the extra line of code to be tidy.
* previously-existing init file.
*/
if (rename(tempfilename, finalfilename) < 0)
+ {
elog(NOTICE, "Cannot rename init file %s to %s: %m\n\tContinuing anyway, but there's something wrong.", tempfilename, finalfilename);
+ /*
+ * If we fail, try to clean up the useless temp file; don't bother
+ * to complain if this fails too.
+ */
+ unlink(tempfilename);
+ }
}