Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85642ec

Browse files
committed
Prevent pg_upgrade from crashing if it can't write to the current
directory.Backpatch to 9.2.
1 parent914b130 commit85642ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎contrib/pg_upgrade/util.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ pg_log(eLogType type, char *fmt,...)
7878
va_end(args);
7979

8080
/* PG_VERBOSE is only output in verbose mode */
81-
if (type!=PG_VERBOSE||log_opts.verbose)
81+
/* fopen() on log_opts.internal might have failed, so check it */
82+
if ((type!=PG_VERBOSE||log_opts.verbose)&&log_opts.internal!=NULL)
8283
{
8384
fwrite(message,strlen(message),1,log_opts.internal);
8485
/* if we are using OVERWRITE_MESSAGE, add newline to log file */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp