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

From Andres Freund
Subject Re: bgworker crashed or not?
Date
Msg-id 20140416161143.GN17874@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?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2014-04-16 12:04:26 -0400, Robert Haas wrote:
> And... so what's the problem?  You seemed to be saying that the
> background worker would need to a more developed error-handling
> environment in order to do proper logging, but here you're saying
> (rightly, I believe) that it doesn't.  Even if it did, though, I think
> the right solution is to install one, not make it the postmaster's job
> to try to read the tea leaves in the worker's exit code.

Well, currently it will log the message that has been thrown, that might
lack context. LogChildExit() already has code to print activity of the
bgworker after it crashed.

Note that a FATAL error will always use a exit(1) - so we better not
make that a special case in the code :/.

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Question about optimising (Postgres_)FDW
Next
From: Robert Haas
Date:
Subject: Re: BGWorkers, shared memory pointers, and postmaster restart