On 24/04/14 07:39, Craig Ringer wrote:
> On 04/17/2014 08:35 AM, Craig Ringer wrote:
>>
>> As far as I can tell we have a couple of options:
>>
>> - Redefine what the exit codes mean so that exit 0 suppresses
>> auto-restart and exits silently. Probably simplest.
>
> I'm now strongly in favour of this alternative.
>
> I've just noticed that the bgworker control interfaces do not honour
> bgw.bgw_restart_time = BGW_NEVER_RESTART if you exit with status zero.
>
> This means that it's not simply a problem where you can't say "restart
> me if I crash, but not if I exit normally".
>
> You also can't even say "never restart me at all". Because
> "BGW_NEVER_RESTART" seems to really mean "BGW_NO_RESTART_ON_CRASH".
>
Yes this was one of the reasons why I complained also. Maybe it would be
enough to just honor the bgw_restart_time always.
-- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services