File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 24
24
#include "utils/thread.h"
25
25
#include <time.h>
26
26
27
- #define PG_STOP_BACKUP_TIMEOUT 300
28
-
29
27
/*
30
28
* Macro needed to parse ptrack.
31
29
* NOTE Keep those values syncronised with definitions in ptrack.h
@@ -1858,8 +1856,8 @@ pg_stop_backup(pgBackup *backup)
1858
1856
}
1859
1857
1860
1858
/*
1861
- * Wait for the result of pg_stop_backup(),
1862
- * but no longer than PG_STOP_BACKUP_TIMEOUT seconds
1859
+ * Wait for the result of pg_stop_backup(), but no longer than
1860
+ * archive_timeout seconds
1863
1861
*/
1864
1862
if (pg_stop_backup_is_sent && !in_cleanup )
1865
1863
{
@@ -1882,14 +1880,14 @@ pg_stop_backup(pgBackup *backup)
1882
1880
elog (INFO , "wait for pg_stop_backup()" );
1883
1881
1884
1882
/*
1885
- * If postgres haven't answered in PG_STOP_BACKUP_TIMEOUT seconds,
1883
+ * If postgres haven't answered in archive_timeout seconds,
1886
1884
* send an interrupt.
1887
1885
*/
1888
- if (pg_stop_backup_timeout > PG_STOP_BACKUP_TIMEOUT )
1886
+ if (pg_stop_backup_timeout > archive_timeout )
1889
1887
{
1890
1888
pgut_cancel (conn );
1891
1889
elog (ERROR , "pg_stop_backup doesn't answer in %d seconds, cancel it" ,
1892
- PG_STOP_BACKUP_TIMEOUT );
1890
+ archive_timeout );
1893
1891
}
1894
1892
}
1895
1893
else
You can’t perform that action at this time.
0 commit comments