mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-28 11:55:03 +03:00 
			
		
		
		
	In pg_upgrade, use pg_log() instead of prep_status() for
newline-terminated messages, per suggestion from Tom. Backpatch to 9.2.
This commit is contained in:
		| @@ -36,7 +36,7 @@ transfer_all_new_dbs(DbInfoArr *old_db_arr, | |||||||
| 				new_dbnum; | 				new_dbnum; | ||||||
| 	const char *msg = NULL; | 	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"); | 	  user_opts.transfer_mode == TRANSFER_MODE_LINK ? "Linking" : "Copying"); | ||||||
|  |  | ||||||
| 	/* Scan the old cluster databases and transfer their files */ | 	/* Scan the old cluster databases and transfer their files */ | ||||||
|   | |||||||
| @@ -81,7 +81,7 @@ pg_log(eLogType type, char *fmt,...) | |||||||
| 	if (type != PG_VERBOSE || log_opts.verbose) | 	if (type != PG_VERBOSE || log_opts.verbose) | ||||||
| 	{ | 	{ | ||||||
| 		fwrite(message, strlen(message), 1, log_opts.internal); | 		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) | 		if (strchr(message, '\r') != NULL) | ||||||
| 			fwrite("\n", 1, 1, log_opts.internal); | 			fwrite("\n", 1, 1, log_opts.internal); | ||||||
| 		fflush(log_opts.internal); | 		fflush(log_opts.internal); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user