Hi,
while working on something else, I noticed that some error messages in
pg_basebackup do not have a "\n" at the end, resulting in output like:
|pg_basebackup: could not get COPY data stream: pg_basebackup: removing
|data directory "data2"
Patch attached.
Michael
--
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax: +49 2166 9901-100
Email: michael.ba...@credativ.de
credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 1b32592063..51afc5647b 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1087,7 +1080,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum)
res = PQgetResult(conn);
if (PQresultStatus(res) != PGRES_COPY_OUT)
{
- fprintf(stderr, _("%s: could not get COPY data stream: %s"),
+ fprintf(stderr, _("%s: could not get COPY data stream: %s\n"),
progname, PQerrorMessage(conn));
disconnect_and_exit(1);
}
@@ -1168,7 +1161,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum)
}
else if (r == -2)
{
- fprintf(stderr, _("%s: could not read COPY data: %s"),
+ fprintf(stderr, _("%s: could not read COPY data: %s\n"),
progname, PQerrorMessage(conn));
disconnect_and_exit(1);
}
@@ -1360,7 +1353,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
res = PQgetResult(conn);
if (PQresultStatus(res) != PGRES_COPY_OUT)
{
- fprintf(stderr, _("%s: could not get COPY data stream: %s"),
+ fprintf(stderr, _("%s: could not get COPY data stream: %d\n"),
progname, PQerrorMessage(conn));
disconnect_and_exit(1);
}
@@ -1389,7 +1382,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
}
else if (r == -2)
{
- fprintf(stderr, _("%s: could not read COPY data: %s"),
+ fprintf(stderr, _("%s: could not read COPY data: %s\n"),
progname, PQerrorMessage(conn));
disconnect_and_exit(1);
}