mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-24 08:52:38 +02:00
[Issue #204] Enforce "no-forward-compatibility" policy on remote agent
This commit is contained in:
parent
612e928d1b
commit
884dd528a5
@ -345,6 +345,16 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
else if (strcmp(argv[1], "agent") == 0)
|
||||
{
|
||||
/* 'No forward compatibility' sanity:
|
||||
* /old/binary -> ssh execute -> /newer/binary agent version_num
|
||||
* If we are executed as an agent for older binary, then exit with error
|
||||
*/
|
||||
if (argc > 2)
|
||||
{
|
||||
elog(ERROR, "Version mismatch, pg_probackup binary with version '%s' "
|
||||
"is launched as an agent for pg_probackup binary with version '%s'",
|
||||
PROGRAM_VERSION, argv[2]);
|
||||
}
|
||||
fio_communicate(STDIN_FILENO, STDOUT_FILENO);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user