Skip to content

Commit 67d17b5

Browse files
committed
Merge branch 'pg-9.5'
2 parents 3fcdae0 + 8192f0e commit 67d17b5

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/backup.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -917,22 +917,23 @@ check_system_identifiers(void)
917917

918918
system_id_pgdata = get_system_identifier(pgdata);
919919

920-
res = pgut_execute(backup_conn,
920+
if (server_version < 90600) {
921+
} else {
922+
res = pgut_execute(backup_conn,
921923
"SELECT system_identifier FROM pg_control_system()",
922924
0, NULL, true);
923-
val = PQgetvalue(res, 0, 0);
924-
925-
if (!parse_uint64(val, &system_id_conn, 0))
926-
{
925+
val = PQgetvalue(res, 0, 0);
926+
if (!parse_uint64(val, &system_id_conn, 0))
927+
{
928+
PQclear(res);
929+
elog(ERROR, "%s is not system_identifier", val);
930+
}
927931
PQclear(res);
928-
elog(ERROR, "%s is not system_identifier", val);
929-
}
930-
PQclear(res);
931-
932-
if (system_id_conn != system_identifier)
933-
elog(ERROR, "Backup data directory was initialized for system id %ld, but connected instance system id is %ld",
934-
system_identifier, system_id_conn);
935932

933+
if (system_id_conn != system_identifier)
934+
elog(ERROR, "Backup data directory was initialized for system id %ld, but connected instance system id is %ld",
935+
system_identifier, system_id_conn);
936+
}
936937
if (system_id_pgdata != system_identifier)
937938
elog(ERROR, "Backup data directory was initialized for system id %ld, but target backup directory system id is %ld",
938939
system_identifier, system_id_pgdata);

0 commit comments

Comments
 (0)