Re: background worker and normal exit

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: background worker and normal exit
Date: 2013-05-28 14:37:40
Message-ID: 20130528143740.GA16637@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-05-28 10:33:47 -0400, Robert Haas wrote:
> On Tue, May 28, 2013 at 10:31 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > On 2013-05-28 10:23:46 -0400, Robert Haas wrote:
> >> On Sun, May 26, 2013 at 6:48 PM, Michael Paquier
> >> > - set bgw_restart_time to BGW_NEVER_RESTART. and have the bgworler exit with
> >> > non-0 status code.
> >>
> >> That might be good enough, though.
> >
> > I suggested that to Fujii at pgcon, and it seems to work for him. But I
> > think this sucks since you loose support for a restart upon a FATAL or
> > similar error. And you cannot mark that as something non-fatal in the
> > log. To this day I laugh about the following oddity in the xorg log:
> >
> > [ 30.087] (II) RADEON(0): RandR 1.2 enabled, ignore the following RandR disabled message.
> > [ 30.088] (--) RandR disabled
> >
> > I really don't want to go there.
> >
> > You actually can only return a 1 since everything else will tear down
> > the whole cluster...
> >
> > We actually were discussing this recently:
> > http://archives.postgresql.org/message-id/20130423134833.GD8499%40alap2.anarazel.de
> >
> > I think a separate return code for "exited gracefully, don't restart"
> > would be a good idea.
>
> Yeah. Or maybe the restart-timing/restart-when logic should just
> apply to the exit(0) case as well. Not sure what the downside of that
> would be.

Loosing the ability to restart a process where the reason for exiting
are non-fatal and shouldn't be logged noisily or are already logged. I
actually could use both capabilities.

Greetings,

Andres Freund

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Benedikt Grundmann 2013-05-28 14:53:59 Re: streaming replication, "frozen snapshot backup on it" and missing relfile (postgres 9.2.3 on xfs + LVM)
Previous Message Robert Haas 2013-05-28 14:33:47 Re: background worker and normal exit