@@ -492,7 +492,7 @@ do_backup_instance(void)
492492 current .data_bytes = 0 ;
493493
494494 /* Obtain current timeline */
495- if (instance_config . remote . enabled )
495+ if (IsReplicationProtocol () )
496496 {
497497 char * sysidentifier ;
498498 TimeLineID starttli ;
@@ -632,7 +632,8 @@ do_backup_instance(void)
632632 backup_files_list = parray_new ();
633633
634634 /* list files with the logical path. omit $PGDATA */
635- if (instance_config .remote .enabled )
635+
636+ if (IsReplicationProtocol ())
636637 get_remote_pgdata_filelist (backup_files_list );
637638 else
638639 dir_list_file (backup_files_list , instance_config .pgdata ,
@@ -699,7 +700,7 @@ do_backup_instance(void)
699700 char * dir_name ;
700701 char database_path [MAXPGPATH ];
701702
702- if (!instance_config . remote . enabled )
703+ if (!IsReplicationProtocol () )
703704 dir_name = GetRelativePath (file -> path , instance_config .pgdata );
704705 else
705706 dir_name = file -> path ;
@@ -749,7 +750,7 @@ do_backup_instance(void)
749750
750751 elog (VERBOSE , "Start thread num: %i" , i );
751752
752- if (!instance_config . remote . enabled )
753+ if (!IsReplicationProtocol () )
753754 pthread_create (& threads [i ], NULL , backup_files , arg );
754755 else
755756 pthread_create (& threads [i ], NULL , remote_backup_files , arg );
@@ -902,7 +903,7 @@ do_backup(time_t start_time)
902903 check_server_version ();
903904
904905 /* TODO fix it for remote backup*/
905- if (!instance_config . remote . enabled )
906+ if (!IsReplicationProtocol () )
906907 current .checksum_version = get_data_checksum_version (true);
907908
908909 is_checksum_enabled = pg_checksum_enable ();
@@ -958,7 +959,7 @@ do_backup(time_t start_time)
958959 * belogns to the same instance.
959960 */
960961 /* TODO fix it for remote backup */
961- if (!instance_config . remote . enabled )
962+ if (!IsReplicationProtocol () )
962963 check_system_identifiers ();
963964
964965
0 commit comments