Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WdFrO-0002ut-Uc for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Apr 2014 09:22:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WdFrO-0006Gy-Ed for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Apr 2014 09:22:26 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WdFrM-0006Gp-Ht for pgsql-hackers@postgresql.org; Thu, 24 Apr 2014 09:22:24 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WdFrF-0007oi-K3 for pgsql-hackers@postgresql.org; Thu, 24 Apr 2014 09:22:23 +0000 Received: from [10.1.3.40] (fw.node5.cz [89.22.65.200]) by mrelayeu.kundenserver.de (node=mreue001) with ESMTP (Nemesis) id 0MZ5db-1WQpFt01A3-00VfLT; Thu, 24 Apr 2014 11:22:14 +0200 Message-ID: <5358D7C5.7060706@2ndquadrant.com> Date: Thu, 24 Apr 2014 11:22:13 +0200 From: Petr Jelinek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Craig Ringer , Robert Haas , Andres Freund CC: Tom Lane , Antonin Houska , "pgsql-hackers@postgresql.org" , Abhijit Menon-Sen Subject: Re: bgworker crashed or not? References: <20140416131052.GG17874@awork2.anarazel.de> <20140416152803.GJ17874@awork2.anarazel.de> <20140416154412.GL17874@awork2.anarazel.de> <27214.1397663665@sss.pgh.pa.us> <20140416160047.GM17874@awork2.anarazel.de> <20140416161143.GN17874@awork2.anarazel.de> <20140416162837.GO17874@awork2.anarazel.de> <534EEC61.7000006@2ndquadrant.com> <534F21E6.7080705@2ndquadrant.com> <5358A38F.50808@2ndquadrant.com> In-Reply-To: <5358A38F.50808@2ndquadrant.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:Ry0MXn0vzZ6UfEnP8JTk3K5koWgyur7guSP5QPOLGhO r/hFupO2wSfEtUdtvVbJVjWkdD+azfLkeaA+5aKp5srfPa45BH JS9gBD5AKV5NBGRpAHi96jVmo4hL06UjRXfUHIpq1sCCLb+WbY GlUPqdKizX2OsqjA8IGGtZqvvsf6LCnFi1TNoOa3B4kAsJFBjV hzkvFeCGK88lFffc/UKmAoPHYvnQ46gcIV5AC1L5EDhYxcqyFw JB67XnQ1ZcuGfSIXQq7XDxlxpxLq0td5uT5i2mX/wBU9Zoq6n1 wIenzPc10zoJ1j3HMqzEoCy+uLhmpyuTSjeP+hf4RnXeCd3MyA 1Q7Ck0wEdM/bZVi2mTTo= X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers