1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Revert "Fix bug in checking of IDENTIFY_SYSTEM result."

This reverts commit 083d29c65b.

The commit changed the code so that it causes an errors when
IDENTIFY_SYSTEM returns three columns. But which prevents us
from using the replication-related utilities against the server
with older version. This is not what we want. For that
compatibility, we allow the utilities to receive three columns
as the result of IDENTIFY_SYSTEM eventhough it actually returns
four columns in 9.4 or later.

Pointed out by Andres Freund.
This commit is contained in:
Fujii Masao
2014-08-19 18:30:38 +09:00
parent 083d29c65b
commit c476288653
4 changed files with 8 additions and 8 deletions

View File

@ -499,11 +499,11 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
PQclear(res);
return false;
}
if (PQntuples(res) != 1 || PQnfields(res) < 4)
if (PQntuples(res) != 1 || PQnfields(res) < 3)
{
fprintf(stderr,
_("%s: could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields\n"),
progname, PQntuples(res), PQnfields(res), 1, 4);
progname, PQntuples(res), PQnfields(res), 1, 3);
PQclear(res);
return false;
}