Re: SQLSTATE 00000 and message level LOG get logged when a server process crashes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vadim Kalinkin <vadim(dot)kalinkin(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: SQLSTATE 00000 and message level LOG get logged when a server process crashes
Date: 2014-07-16 14:44:01
Message-ID: 26572.1405521841@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Vadim Kalinkin <vadim(dot)kalinkin(at)gmail(dot)com> writes:
> Say, some worker process was terminated for whatever reason.
> In logfile that fact is reflected with messages by postmaster:

> 00000 2014-07-16 09:10:15.442 MSK [1755-5] d=,u=,h= LOG:
> server process (PID 12652) was terminated by signal 11: Segmentation fault
> 00000 2014-07-16 09:10:15.442 MSK [1755-6] d=,u=,h= DETAIL:
> Failed process was running: select * from <...>
> 00000 2014-07-16 09:10:15.442 MSK [1755-7] d=,u=,h= LOG:
> terminating any other active server processes

> (log_line_prefix = '%e %m [%p-%l] d=%d,u=%u,h=%h ')

> Why SQLSTATE 00000 and message level LOG are used here?
> Wouldn't SQLSTATE of Class 58 (System Error) and message level ERROR or
> FATAL be more suitable here?

ERROR or FATAL would mean that the postmaster itself was about to
terminate, which is not the case here. We can't do anything different
than LOG; that's actually the "most severe" non-terminating log level
available to a background process.

It is a bit bogus that there's no SQLSTATE assigned, perhaps.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Pedro Gimeno 2014-07-16 14:53:16 Re: Documentation problem: The syntax for "\copy" is just wrong
Previous Message Tom Lane 2014-07-16 14:25:59 Re: Disable View rule