Skip to content

Commit

Permalink
Merge pull request munakoiso#10 from munakoiso/crash_shutdown
Browse files Browse the repository at this point in the history
ignore ERRCODE_CRASH_SHUTDOWN because of lock problems
  • Loading branch information
munakoiso authored Apr 13, 2021
2 parents 3c55887 + 85e22aa commit 8874624
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions logerrors.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,11 @@ logerrors_emit_log_hook(ErrorData *edata)
for (lvl_i = 0; lvl_i < message_types_count; ++lvl_i)
{
/* Only current message type */
if (edata->elevel != message_types_codes[lvl_i]) {
if (edata->elevel != message_types_codes[lvl_i])
continue;
/* Ignore ERRCODE_CRASH_SHUTDOWN because of lock problems */
if (edata->sqlerrcode == ERRCODE_CRASH_SHUTDOWN)
continue;
}
add_message(edata->sqlerrcode, MyDatabaseId, GetUserId(), lvl_i);
pg_atomic_fetch_add_u32(&global_variables->total_count[lvl_i], 1);
}
Expand Down

0 comments on commit 8874624

Please sign in to comment.