Re: bgworker crashed or not? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: bgworker crashed or not?
Date
Msg-id 20140416154412.GL17874@awork2.anarazel.de
Whole thread Raw
In response to Re: bgworker crashed or not?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: bgworker crashed or not?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2014-04-16 11:37:47 -0400, Robert Haas wrote:
> > I think we probably also need a way to exit that's treated as an error,
> > but doesn't lead to a PANIC restart.
> 
> Why can't that be handled through ereport(ERROR/FATAL) rather than
> through the choice of exit status?  It seems to me that the only point
> of the exit status is or should be to provide feedback to the
> postmaster on how it should respond to the background worker's
> untimely demise.  If any other information needs to be conveyed, the
> worker should log that itself rather than trying to tell the
> postmaster what to log.

I dislike that because it essentially requires the bgworker to have a
full error catching environment like PostgresMain() has. That seems
bad for many cases.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: test failure on latest source
Next
From: Tom Lane
Date:
Subject: Re: bgworker crashed or not?