From 5c3532876f8360df10692baf77a0b79c41ee001e Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 5 Jun 2012 13:13:53 +0200 Subject: [PATCH] Backpatch error message fix from 81f6bbe8ade8c90f23f9286ca9ca726d3e0e310f Without this, pg_basebackup doesn't tell you why it failed when for example there is a file in the data directory that the backend doesn't have permissions to read. --- src/bin/pg_basebackup/pg_basebackup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index e9fb2cc08dc..472df3a1fbf 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -931,8 +931,8 @@ BaseBackup(void) res = PQgetResult(conn); if (PQresultStatus(res) != PGRES_TUPLES_OK) { - fprintf(stderr, _("%s: could not get WAL end position from server\n"), - progname); + fprintf(stderr, _("%s: could not get WAL end position from server: %s"), + progname, PQerrorMessage(conn)); disconnect_and_exit(1); } if (PQntuples(res) != 1)