1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-07 13:40:17 +02:00

Merge pull request #21 from rtau-t24/master

Skip system_identifier check on PostgreSQL 9.5
This commit is contained in:
Arthur 2017-12-11 13:59:51 +03:00 committed by GitHub
commit 45be8b5d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
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);