File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -1006,14 +1006,6 @@ backup_cleanup(bool fatal, void *userdata)
1006
1006
{
1007
1007
char path [MAXPGPATH ];
1008
1008
1009
- /* If backup_label exists in $PGDATA, notify stop of backup to PostgreSQL */
1010
- join_path_components (path , pgdata , PG_BACKUP_LABEL_FILE );
1011
- if (fileExists (path ))
1012
- {
1013
- elog (LOG , "%s exists, stop backup" , PG_BACKUP_LABEL_FILE );
1014
- pg_stop_backup (NULL ); /* don't care stop_lsn on error case */
1015
- }
1016
-
1017
1009
/*
1018
1010
* Update status of backup in BACKUP_CONTROL_FILE to ERROR.
1019
1011
* end_time != 0 means backup finished
@@ -1025,6 +1017,17 @@ backup_cleanup(bool fatal, void *userdata)
1025
1017
current .status = BACKUP_STATUS_ERROR ;
1026
1018
pgBackupWriteBackupControlFile (& current );
1027
1019
}
1020
+
1021
+ /*
1022
+ * If backup_label exists in $PGDATA, notify stop of backup to PostgreSQL
1023
+ * TODO Do we need this?
1024
+ */
1025
+ join_path_components (path , pgdata , PG_BACKUP_LABEL_FILE );
1026
+ if (fileExists (path ))
1027
+ {
1028
+ elog (LOG , "%s exists, stop backup" , PG_BACKUP_LABEL_FILE );
1029
+ pg_stop_backup (NULL ); /* don't care stop_lsn on error case */
1030
+ }
1028
1031
}
1029
1032
1030
1033
/*
You can’t perform that action at this time.
0 commit comments