Skip to content

Commit a528352

Browse files
committed
Merge branch 'master' of github.com:postgrespro/pg_probackup
2 parents 4efa7ab + 45be8b5 commit a528352

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/backup.c

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -922,22 +922,25 @@ check_system_identifiers(void)
922922

923923
system_id_pgdata = get_system_identifier(pgdata);
924924

925-
res = pgut_execute(backup_conn,
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,
926930
"SELECT system_identifier FROM pg_control_system()",
927931
0, NULL, true);
928-
val = PQgetvalue(res, 0, 0);
929-
930-
if (!parse_uint64(val, &system_id_conn, 0))
931-
{
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+
}
932938
PQclear(res);
933-
elog(ERROR, "%s is not system_identifier", val);
934-
}
935-
PQclear(res);
936-
937-
if (system_id_conn != system_identifier)
938-
elog(ERROR, "Backup data directory was initialized for system id %ld, but connected instance system id is %ld",
939-
system_identifier, system_id_conn);
940939

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+
}
941944
if (system_id_pgdata != system_identifier)
942945
elog(ERROR, "Backup data directory was initialized for system id %ld, but target backup directory system id is %ld",
943946
system_identifier, system_id_pgdata);

0 commit comments

Comments
 (0)