@@ -915,32 +915,15 @@ check_server_version(void)
915915static void
916916check_system_identifiers (void )
917917{
918- PGresult * res ;
919918 uint64 system_id_conn ;
920919 uint64 system_id_pgdata ;
921- char * val ;
922920
923921 system_id_pgdata = get_system_identifier (pgdata );
922+ system_id_conn = get_remote_system_identifier (backup_conn );
924923
925- if (server_version < 90600 ) {
926- // Skip match system_identifier between backup data directory and DB connection as
927- // pg_control_system() exists only in 9.6 onwards
928- } else {
929- res = pgut_execute (backup_conn ,
930- "SELECT system_identifier FROM pg_control_system()" ,
931- 0 , NULL , true);
932- val = PQgetvalue (res , 0 , 0 );
933- if (!parse_uint64 (val , & system_id_conn , 0 ))
934- {
935- PQclear (res );
936- elog (ERROR , "%s is not system_identifier" , val );
937- }
938- PQclear (res );
939-
940- if (system_id_conn != system_identifier )
941- elog (ERROR , "Backup data directory was initialized for system id %ld, but connected instance system id is %ld" ,
942- system_identifier , system_id_conn );
943- }
924+ if (system_id_conn != system_identifier )
925+ elog (ERROR , "Backup data directory was initialized for system id %ld, but connected instance system id is %ld" ,
926+ system_identifier , system_id_conn );
944927 if (system_id_pgdata != system_identifier )
945928 elog (ERROR , "Backup data directory was initialized for system id %ld, but target backup directory system id is %ld" ,
946929 system_identifier , system_id_pgdata );
0 commit comments