From: Bruce Momjian Date: Fri, 3 Aug 2012 16:43:37 +0000 (-0400) Subject: In pg_upgrade, use pg_log() instead of prep_status() for X-Git-Tag: REL9_3_BETA1~1147 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8969c4733b15857d6af2ec024a102897bfbfbf2;p=postgresql In pg_upgrade, use pg_log() instead of prep_status() for newline-terminated messages, per suggestion from Tom. Backpatch to 9.2. --- diff --git a/contrib/pg_upgrade/relfilenode.c b/contrib/pg_upgrade/relfilenode.c index 7688914079..33a867f0d0 100644 --- a/contrib/pg_upgrade/relfilenode.c +++ b/contrib/pg_upgrade/relfilenode.c @@ -36,7 +36,7 @@ transfer_all_new_dbs(DbInfoArr *old_db_arr, new_dbnum; const char *msg = NULL; - prep_status("%s user relation files\n", + pg_log(PG_REPORT, "%s user relation files\n", user_opts.transfer_mode == TRANSFER_MODE_LINK ? "Linking" : "Copying"); /* Scan the old cluster databases and transfer their files */ diff --git a/contrib/pg_upgrade/util.c b/contrib/pg_upgrade/util.c index 76cd20b23d..1c7120471f 100644 --- a/contrib/pg_upgrade/util.c +++ b/contrib/pg_upgrade/util.c @@ -81,7 +81,7 @@ pg_log(eLogType type, char *fmt,...) if (type != PG_VERBOSE || log_opts.verbose) { fwrite(message, strlen(message), 1, log_opts.internal); - /* if we are using OVERWRITE_MESSAGE, add newline */ + /* if we are using OVERWRITE_MESSAGE, add newline to log file */ if (strchr(message, '\r') != NULL) fwrite("\n", 1, 1, log_opts.internal); fflush(log_opts.internal);