1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

In pg_upgrade, add various logging improvements:

add ability to control permissions of created files
	have psql echo its queries for easier debugging
	output four separate log files, and delete them on success
	add -r/--retain option to keep log files after success
	make logs file append-only
	remove -g/-G/-l logging options
	sugggest tailing appropriate log file on failure
	enhance -v/--verbose behavior
This commit is contained in:
Bruce Momjian
2012-03-12 19:47:54 -04:00
parent b4af1c25bb
commit 717f6d6085
16 changed files with 257 additions and 234 deletions

View File

@ -267,7 +267,7 @@ transfer_relfile(pageCnvCtx *pageConverter, const char *old_file,
if (user_opts.transfer_mode == TRANSFER_MODE_COPY)
{
pg_log(PG_INFO, "copying \"%s\" to \"%s\"\n", old_file, new_file);
pg_log(PG_VERBOSE, "copying \"%s\" to \"%s\"\n", old_file, new_file);
if ((msg = copyAndUpdateFile(pageConverter, old_file, new_file, true)) != NULL)
pg_log(PG_FATAL, "error while copying relation \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
@ -275,7 +275,7 @@ transfer_relfile(pageCnvCtx *pageConverter, const char *old_file,
}
else
{
pg_log(PG_INFO, "linking \"%s\" to \"%s\"\n", old_file, new_file);
pg_log(PG_VERBOSE, "linking \"%s\" to \"%s\"\n", old_file, new_file);
if ((msg = linkAndUpdateFile(pageConverter, old_file, new_file)) != NULL)
pg_log(PG_FATAL,