Re: error handling in RegisterBackgroundWorker

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: error handling in RegisterBackgroundWorker
Date: 2017-03-29 19:58:40
Message-ID: 20170329195840.rlmzm7nbznh5dlb6@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Wed, Mar 29, 2017 at 2:10 PM, Peter Eisentraut
> <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> > How specifically would we do that? And what user would choose the
> > behavior "start this background worker but don't worry if it doesn't work"?
>
> Well, if the background worker is auto-prewarm, you'd probably rather
> have the database start rather than get unhappy about auto-prewarm
> failing. If the background worker is your logical replication
> launcher it's a bit more serious, but if you have no subscriptions or
> they're not that critical, maybe you don't care. If the background
> worker is in charge of telling your failover solution that this node
> is up, then starting without it is entirely pointless.
>
> I would be inclined to leave this alone for now and revisit it for a
> future release. I don't feel confident that we really know what the
> right thing to do is here.

I think the common case is for modules to be critical: you may not care
about it for auto-prewarm, but that seems like a special case. I would
put it the other way around: having the load fail is a serious problem
unless specifically configured not to be. I'd do as Peter suggests, and
perhaps allow the current behavior optionally. In hindsight, the
current behavior seems like a mistake.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2017-03-29 20:13:48 Re: REINDEX CONCURRENTLY 2.0
Previous Message Alvaro Herrera 2017-03-29 19:38:07 Re: Schedule and Release Management Team for PG10