mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 03:41:27 +02:00
Prevent pg_upgrade from crashing if it can't write to the current
directory. Backpatch to 9.2.
This commit is contained in:
parent
914b1301cc
commit
85642ec00b
@ -78,7 +78,8 @@ pg_log(eLogType type, char *fmt,...)
|
|||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
/* PG_VERBOSE is only output in verbose mode */
|
/* PG_VERBOSE is only output in verbose mode */
|
||||||
if (type != PG_VERBOSE || log_opts.verbose)
|
/* fopen() on log_opts.internal might have failed, so check it */
|
||||||
|
if ((type != PG_VERBOSE || log_opts.verbose) && log_opts.internal != NULL)
|
||||||
{
|
{
|
||||||
fwrite(message, strlen(message), 1, log_opts.internal);
|
fwrite(message, strlen(message), 1, log_opts.internal);
|
||||||
/* if we are using OVERWRITE_MESSAGE, add newline to log file */
|
/* if we are using OVERWRITE_MESSAGE, add newline to log file */
|
||||||
|
Loading…
Reference in New Issue
Block a user