Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions src/backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down