]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Backpatch error message fix from 81f6bbe8ade8c90f23f9286ca9ca726d3e0e310f
authorMagnus Hagander <magnus@hagander.net>
Tue, 5 Jun 2012 11:13:53 +0000 (13:13 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 5 Jun 2012 11:13:53 +0000 (13:13 +0200)
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

index e9fb2cc08dcf86572baa736d81c0419c4c0e9728..472df3a1fbfb2dc8fee7c26b326df82f396ed5f2 100644 (file)
@@ -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)