File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ do_backup(bool smooth_checkpoint)
400
400
{
401
401
parray * backup_list ;
402
402
parray * files_database ;
403
+ bool is_ptrack_support ;
403
404
404
405
/* PGDATA and BACKUP_MODE are always required */
405
406
if (pgdata == NULL )
@@ -427,12 +428,16 @@ do_backup(bool smooth_checkpoint)
427
428
elog (ERROR , "backup is not allowed for standby" );
428
429
429
430
/* ptrack backup checks */
430
- if (current .backup_mode == BACKUP_MODE_DIFF_PTRACK && !pg_ptrack_support ())
431
+ is_ptrack_support = pg_ptrack_support ();
432
+ if (current .backup_mode == BACKUP_MODE_DIFF_PTRACK && !is_ptrack_support )
431
433
elog (ERROR , "current Postgres instance does not support ptrack" );
432
434
433
- is_ptrack_enable = pg_ptrack_enable ();
434
- if (current .backup_mode == BACKUP_MODE_DIFF_PTRACK && !is_ptrack_enable )
435
- elog (ERROR , "ptrack is disabled" );
435
+ if (is_ptrack_support )
436
+ {
437
+ is_ptrack_enable = pg_ptrack_enable ();
438
+ if (current .backup_mode == BACKUP_MODE_DIFF_PTRACK && !is_ptrack_enable )
439
+ elog (ERROR , "ptrack is disabled" );
440
+ }
436
441
437
442
/* Get exclusive lock of backup catalog */
438
443
catalog_lock (true);
You can’t perform that action at this time.
0 commit comments