Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDumE-0000Ob-1A for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jun 2016 14:29:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDumD-0003SW-K3 for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jun 2016 14:29:41 +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 1bDulZ-0002iv-JZ for pgsql-bugs@postgresql.org; Fri, 17 Jun 2016 14:29:01 +0000 Received: from mimolette.dalibo.net ([212.85.157.144] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDulS-0000Jt-PN for pgsql-bugs@postgresql.org; Fri, 17 Jun 2016 14:29:00 +0000 Received: from firost (glo44-1-82-67-129-175.fbx.proxad.net [82.67.129.175]) by mail.dalibo.com (Postfix) with ESMTPSA id E6FB92C2CD5; Fri, 17 Jun 2016 16:28:51 +0200 (CEST) Date: Fri, 17 Jun 2016 16:28:50 +0200 From: Jehan-Guillaume de Rorthais To: Tom Lane Cc: Michael Paquier , PostgreSQL mailing lists Subject: Re: Segmentation fault with postgres -C external_pid_file Message-ID: <20160617162850.419d577b@firost> In-Reply-To: <31465.1466092207@sss.pgh.pa.us> References: <20160615204036.2d35d86a@firost> <31465.1466092207@sss.pgh.pa.us> Organization: Dalibo X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) 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 Le Thu, 16 Jun 2016 11:50:07 -0400, Tom Lane a =C3=A9crit : > 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) >=20 > > Confirmed. puts() would print (null) on OSX even if that's not > > mentioned in the standard, and Linux would just segfault on it. >=20 > Right, this is going to be platform-specific behavior. >=20 > > 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: >=20 > Agreed, fixing the -C code seems much less likely to have unexpected > side-effects than changing default values. Will push this in a bit. Thank you for the fix guys. Regards, --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs