Skip to content

Commit 8b46ef5

Browse files
committed
Do not validate backup, if binary is compiled with different PG version
1 parent 6a736c2 commit 8b46ef5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/validate.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ pgBackupValidate(pgBackup *backup, pgRestoreParams *params)
120120
return;
121121
}
122122

123+
if (strcmp(backup->server_version, PG_MAJORVERSION) != 0)
124+
{
125+
elog(ERROR, "Backup was made with server version %s, but pg_probackup compiled "
126+
"with server version %s.",
127+
backup->server_version, PG_MAJORVERSION);
128+
}
129+
123130
// if (params && params->partial_db_list)
124131
// dbOid_exclude_list = get_dbOid_exclude_list(backup, files, params->partial_db_list,
125132
// params->partial_restore_type);

0 commit comments

Comments
 (0)