Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c616d85 commit 8507c2fCopy full SHA for 8507c2f
src/backend/access/transam/xlogfuncs.c
@@ -611,14 +611,18 @@ pg_backup_start_time(PG_FUNCTION_ARGS)
611
break;
612
}
613
614
- /*
615
- * Close the backup label file.
616
- */
617
- if (ferror(lfp) || FreeFile(lfp))
+ /* Check for a read error. */
+ if (ferror(lfp))
618
ereport(ERROR,
619
(errcode_for_file_access(),
620
errmsg("could not read file \"%s\": %m", BACKUP_LABEL_FILE)));
621
+ /* Close the backup label file. */
+ if (FreeFile(lfp))
622
+ ereport(ERROR,
623
+ (errcode_for_file_access(),
624
+ errmsg("could not close file \"%s\": %m", BACKUP_LABEL_FILE)));
625
+
626
if (strlen(backup_start_time) == 0)
627
628
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
0 commit comments