diff options
| author | Fujii Masao | 2014-08-19 09:30:38 +0000 |
|---|---|---|
| committer | Fujii Masao | 2014-08-19 09:30:38 +0000 |
| commit | c4762886539b06da682045e19ba73dcee3789638 (patch) | |
| tree | 804ecf6fff27078e7f5f4827c84e6fe5aa5dccfd /src/backend/replication | |
| parent | 083d29c65b7897f90c70e6dc0a4240a5fa75c8f2 (diff) | |
Revert "Fix bug in checking of IDENTIFY_SYSTEM result."
This reverts commit 083d29c65b7897f90c70e6dc0a4240a5fa75c8f2.
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.
Diffstat (limited to 'src/backend/replication')
| -rw-r--r-- | src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c index 7049f12296b..65e95c59f02 100644 --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c +++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c @@ -131,7 +131,7 @@ libpqrcv_identify_system(TimeLineID *primary_tli) "the primary server: %s", PQerrorMessage(streamConn)))); } - if (PQnfields(res) < 4 || PQntuples(res) != 1) + if (PQnfields(res) < 3 || PQntuples(res) != 1) { int ntuples = PQntuples(res); int nfields = PQnfields(res); @@ -140,7 +140,7 @@ libpqrcv_identify_system(TimeLineID *primary_tli) ereport(ERROR, (errmsg("invalid response from primary server"), errdetail("Could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields.", - ntuples, nfields, 4, 1))); + ntuples, nfields, 3, 1))); } primary_sysid = PQgetvalue(res, 0, 0); *primary_tli = pg_atoi(PQgetvalue(res, 0, 1), 4, 0); |
