1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-08 14:28:36 +02:00

Merge branch 'master' of github.com:postgrespro/pg_probackup

This commit is contained in:
Arthur Zakirov 2017-12-11 14:06:47 +03:00
commit a528352919

View File

@ -922,22 +922,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);
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);
}
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_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);