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

Commitb3f32a6

Browse files
committed
Fix misuse of pg_log_info() for details/hints.
Two places in pg_dump_sort.c were using pg_log_info() to addmore details to a message printed with pg_log_warning().This is bad, because at default verbosity level we wouldprint the warning line but not the details. One should usepg_log_warning_detail() or pg_log_warning_hint() instead.Commit9a374b7 got rid of most such abuses, but unaccountablymissed these.Noted while studying a bug report from Sami Imseih.Back-patch to v15 where9a374b7 came in. (Prior versionsdon't have the missing-details misbehavior, for reasonsI didn't bother to track down.)Discussion:https://postgr.es/m/2C1933AB-C2F8-499B-9D18-4AC1882256A0@amazon.com
1 parentd0f4824 commitb3f32a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/bin/pg_dump/pg_dump_sort.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,9 +1233,9 @@ repairDependencyLoop(DumpableObject **loop,
12331233
"there are circular foreign-key constraints among these tables:",
12341234
nLoop));
12351235
for (i=0;i<nLoop;i++)
1236-
pg_log_info("%s",loop[i]->name);
1237-
pg_log_info("You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.");
1238-
pg_log_info("Consider using a full dump instead of a --data-only dump to avoid this problem.");
1236+
pg_log_warning_detail("%s",loop[i]->name);
1237+
pg_log_warning_hint("You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.");
1238+
pg_log_warning_hint("Consider using a full dump instead of a --data-only dump to avoid this problem.");
12391239
if (nLoop>1)
12401240
removeObjectDependency(loop[0],loop[1]->dumpId);
12411241
else/* must be a self-dependency */
@@ -1253,7 +1253,7 @@ repairDependencyLoop(DumpableObject **loop,
12531253
charbuf[1024];
12541254

12551255
describeDumpableObject(loop[i],buf,sizeof(buf));
1256-
pg_log_info("%s",buf);
1256+
pg_log_warning_detail("%s",buf);
12571257
}
12581258

12591259
if (nLoop>1)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp