Hi all, Some grepping is showing up that a couple of newlines are missing in pg_rewind, leading to unreadable log entries: libpq_fetch.c: pg_log(PG_DEBUG, "getting file chunks"); logging.c: pg_log(PG_PROGRESS, "%*s/%s kB (%d%%) copied", filemap.c: pg_fatal("could not stat file \"%s\": %s",
Attached is a patch to fix them. Regards, -- Michael
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c index 3821e9c..b877d55 100644 --- a/src/bin/pg_rewind/filemap.c +++ b/src/bin/pg_rewind/filemap.c @@ -256,7 +256,7 @@ process_target_file(const char *path, file_type_t type, size_t oldsize, if (lstat(localpath, &statbuf) < 0) { if (errno != ENOENT) - pg_fatal("could not stat file \"%s\": %s", + pg_fatal("could not stat file \"%s\": %s\n", localpath, strerror(errno)); exists = false; diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c index 8565bb9..393baa6 100644 --- a/src/bin/pg_rewind/libpq_fetch.c +++ b/src/bin/pg_rewind/libpq_fetch.c @@ -218,7 +218,7 @@ receiveFileChunks(const char *sql) if (PQsendQueryParams(conn, sql, 0, NULL, NULL, NULL, NULL, 1) != 1) pg_fatal("could not send query: %s\n", PQerrorMessage(conn)); - pg_log(PG_DEBUG, "getting file chunks"); + pg_log(PG_DEBUG, "getting file chunks\n"); if (PQsetSingleRowMode(conn) != 1) pg_fatal("could not set libpq connection to single row mode\n"); diff --git a/src/bin/pg_rewind/logging.c b/src/bin/pg_rewind/logging.c index 0e05f96..5763460 100644 --- a/src/bin/pg_rewind/logging.c +++ b/src/bin/pg_rewind/logging.c @@ -137,7 +137,7 @@ progress_report(bool force) snprintf(fetch_size_str, sizeof(fetch_size_str), INT64_FORMAT, fetch_size / 1024); - pg_log(PG_PROGRESS, "%*s/%s kB (%d%%) copied", + pg_log(PG_PROGRESS, "%*s/%s kB (%d%%) copied\n", (int) strlen(fetch_size_str), fetch_done_str, fetch_size_str, percent); printf("\r");
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers