Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8507c2f

Browse files
committed
Improve readability and error messages in pg_backup_start_time.
Gurjeet Singh, with corrections by me.
1 parentc616d85 commit8507c2f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/backend/access/transam/xlogfuncs.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,14 +611,18 @@ pg_backup_start_time(PG_FUNCTION_ARGS)
611611
break;
612612
}
613613

614-
/*
615-
* Close the backup label file.
616-
*/
617-
if (ferror(lfp)||FreeFile(lfp))
614+
/* Check for a read error. */
615+
if (ferror(lfp))
618616
ereport(ERROR,
619617
(errcode_for_file_access(),
620618
errmsg("could not read file \"%s\": %m",BACKUP_LABEL_FILE)));
621619

620+
/* Close the backup label file. */
621+
if (FreeFile(lfp))
622+
ereport(ERROR,
623+
(errcode_for_file_access(),
624+
errmsg("could not close file \"%s\": %m",BACKUP_LABEL_FILE)));
625+
622626
if (strlen(backup_start_time)==0)
623627
ereport(ERROR,
624628
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp