1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Improve pg_upgrade's status display

Pg_upgrade displays file names during copy and database names during
dump/restore.  Andrew Dunstan identified three bugs:

*  long file names were being truncated to 60 _leading_ characters, which
   often do not change for long file names

*  file names were truncated to 60 characters in log files

*  carriage returns were being output to log files

This commit fixes these --- it prints 60 _trailing_ characters to the
status display, and full path names without carriage returns to log
files.  It also suppresses status output to the log file unless verbose
mode is used.
This commit is contained in:
Bruce Momjian
2012-12-07 12:26:13 -05:00
parent ef754fb51b
commit 6dd9584507
5 changed files with 30 additions and 20 deletions

View File

@ -213,7 +213,7 @@ transfer_relfile(pageCnvCtx *pageConverter, FileNameMap *map,
unlink(new_file);
/* Copying files might take some time, so give feedback. */
pg_log(PG_REPORT, OVERWRITE_MESSAGE, old_file);
pg_log(PG_STATUS, "%s", old_file);
if ((user_opts.transfer_mode == TRANSFER_MODE_LINK) && (pageConverter != NULL))
pg_log(PG_FATAL, "This upgrade requires page-by-page conversion, "