aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/receivelog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_basebackup/receivelog.c')
-rw-r--r--src/bin/pg_basebackup/receivelog.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c
index c390cbf13df..8ca3882a729 100644
--- a/src/bin/pg_basebackup/receivelog.c
+++ b/src/bin/pg_basebackup/receivelog.c
@@ -235,6 +235,13 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline, char *sysi
PQclear(res);
return false;
}
+ if (PQnfields(res) != 3 || PQntuples(res) != 1)
+ {
+ fprintf(stderr, _("%s: could not identify system, got %i rows and %i fields\n"),
+ progname, PQntuples(res), PQnfields(res));
+ PQclear(res);
+ return false;
+ }
if (strcmp(sysidentifier, PQgetvalue(res, 0, 0)) != 0)
{
fprintf(stderr, _("%s: system identifier does not match between base backup and streaming connection\n"), progname);