Re: [HACKERS] Reporting query on crash even if completed - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Reporting query on crash even if completed
Date
Msg-id 9333.1505742428@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] Reporting query on crash even if completed  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] Reporting query on crash even if completed
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> When a backend dies, in a manner triggering a crash restart, we
> currently log something like:
> DETAIL: Failed process was running: %s
> 
> That used to be only when there's an active query, but since
> commit 4f42b546fd87a80be30c53a0f2c897acb826ad52
> that's not the case anymore. I can't recall anybody complaining, but to
> me it seems fairly confusing to report that some query was running when
> it's actually not.

I think this is fine.  If the backend crashes in nominally-post-query
mopup, it might be useful to know what it had been running.  If it
really was idle, it seems no more confusing than in pg_stat_activity.

Now, for pg_stat_activity part of the argument why this wouldn't be
confusing was that you could also see the "state" field.  Maybe we
should try to shoehorn equivalent info into the crash log entry?
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Jan Michálek
Date:
Subject: Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] additional contrib test suites