Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDZZG-0005Yg-Uc for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jun 2016 15:50:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDZZG-0006Cw-BA for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jun 2016 15:50:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDZYc-0005UR-Nn for pgsql-bugs@postgresql.org; Thu, 16 Jun 2016 15:50:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDZYZ-00051O-Bk for pgsql-bugs@postgresql.org; Thu, 16 Jun 2016 15:50:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u5GFo7Mb031466; Thu, 16 Jun 2016 11:50:07 -0400 From: Tom Lane To: Michael Paquier cc: Jehan-Guillaume de Rorthais , PostgreSQL mailing lists Subject: Re: Segmentation fault with postgres -C external_pid_file In-reply-to: References: <20160615204036.2d35d86a@firost> Comments: In-reply-to Michael Paquier message dated "Thu, 16 Jun 2016 14:45:04 +0900" Date: Thu, 16 Jun 2016 11:50:07 -0400 Message-ID: <31465.1466092207@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Paquier writes: > On Thu, Jun 16, 2016 at 3:40 AM, Jehan-Guillaume de Rorthais > wrote: >> I just found that the following command always produce a segmentation fault >> when external_pid_file is kept commented: >> $ postgres -C external_pid_file >> Segmentation fault (core dumped) > Confirmed. puts() would print (null) on OSX even if that's not > mentioned in the standard, and Linux would just segfault on it. Right, this is going to be platform-specific behavior. > So instead of your patch, I think that we'd rather just change > PostmasterMain() so as it outputs something useful to the user in case > of a NULL value, like that: Agreed, fixing the -C code seems much less likely to have unexpected side-effects than changing default values. Will push this in a bit. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs