Skip to content

Commit ff61359

Browse files
committed
Log the location field before any backtrace
This order makes more sense because the location is effectively at the lowest level of the backtrace. Discussion: https://www.postgresql.org/message-id/flat/90f5fa04-c410-a54e-9449-aa3749fb7972%402ndquadrant.com
1 parent 986529c commit ff61359

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/backend/utils/error/elog.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2938,13 +2938,6 @@ send_message_to_server_log(ErrorData *edata)
29382938
append_with_tabs(&buf, edata->context);
29392939
appendStringInfoChar(&buf, '\n');
29402940
}
2941-
if (edata->backtrace)
2942-
{
2943-
log_line_prefix(&buf, edata);
2944-
appendStringInfoString(&buf, _("BACKTRACE: "));
2945-
append_with_tabs(&buf, edata->backtrace);
2946-
appendStringInfoChar(&buf, '\n');
2947-
}
29482941
if (Log_error_verbosity >= PGERROR_VERBOSE)
29492942
{
29502943
/* assume no newlines in funcname or filename... */
@@ -2962,6 +2955,13 @@ send_message_to_server_log(ErrorData *edata)
29622955
edata->filename, edata->lineno);
29632956
}
29642957
}
2958+
if (edata->backtrace)
2959+
{
2960+
log_line_prefix(&buf, edata);
2961+
appendStringInfoString(&buf, _("BACKTRACE: "));
2962+
append_with_tabs(&buf, edata->backtrace);
2963+
appendStringInfoChar(&buf, '\n');
2964+
}
29652965
}
29662966

29672967
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy