diff --git a/src/backup.c b/src/backup.c index c94190291..e48c938c1 100644 --- a/src/backup.c +++ b/src/backup.c @@ -917,22 +917,25 @@ check_system_identifiers(void) system_id_pgdata = get_system_identifier(pgdata); - res = pgut_execute(backup_conn, + if (server_version < 90600) { + // Skip match system_identifier between backup data directory and DB connection as + // pg_control_system() exists only in 9.6 onwards + } else { + res = pgut_execute(backup_conn, "SELECT system_identifier FROM pg_control_system()", 0, NULL, true); - val = PQgetvalue(res, 0, 0); - - if (!parse_uint64(val, &system_id_conn, 0)) - { + val = PQgetvalue(res, 0, 0); + if (!parse_uint64(val, &system_id_conn, 0)) + { + PQclear(res); + elog(ERROR, "%s is not system_identifier", val); + } PQclear(res); - elog(ERROR, "%s is not system_identifier", val); - } - PQclear(res); - - if (system_id_conn != system_identifier) - elog(ERROR, "Backup data directory was initialized for system id %ld, but connected instance system id is %ld", - system_identifier, system_id_conn); + if (system_id_conn != system_identifier) + elog(ERROR, "Backup data directory was initialized for system id %ld, but connected instance system id is %ld", + system_identifier, system_id_conn); + } if (system_id_pgdata != system_identifier) elog(ERROR, "Backup data directory was initialized for system id %ld, but target backup directory system id is %ld", system_identifier, system_id_pgdata);