Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhJ7U-0006Xu-N5 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2016 16:21:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bhJ7T-0002Av-Kh for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2016 16:21:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bhJ61-0000JE-2U for pgsql-hackers@postgresql.org; Tue, 06 Sep 2016 16:19:37 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bhJ5x-0002Mr-PT for pgsql-hackers@postgresql.org; Tue, 06 Sep 2016 16:19:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 5E8DC20791; Tue, 6 Sep 2016 12:19:32 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 06 Sep 2016 12:19:32 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=sckSn/wIk/0Pggb sGioOQBHDNX8=; b=o7pvGADOMy9b031BrZGkGBcxq+5f4F86yAZFVNIpt7fU/bt vkJumjuJH1lFxE1sfb4wWgYN8k9sNhCL5Y8W+2/GI/Y/gzhHKwh+2w+0gXyIx8IH O9hgT3fTJdeo/QRKpbgphCfEIzpI8FW/0dfXegkWtqAsUvbKeBTSilGeGSMA= X-Sasl-enc: cpf8j+msNQnVYs/k5ilj4d/7ivmCNnW7USC/4FT0tfVY 1473178772 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 201F0F2D2F; Tue, 6 Sep 2016 12:19:32 -0400 (EDT) Subject: Re: [COMMITTERS] pgsql: Make initdb's suggested "pg_ctl start" command line more reliabl To: Tom Lane References: Cc: pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Tue, 6 Sep 2016 12:19:31 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 8/20/16 3:05 PM, Tom Lane wrote: > Make initdb's suggested "pg_ctl start" command line more reliable. > > The original coding here was not nearly careful enough about quoting > special characters, and it didn't get corner cases right for constructing > the pg_ctl path either. Use join_path_components() and appendShellString() > to do it honestly, so that the string will more likely work if blindly > copied-and-pasted. > > While at it, teach appendShellString() not to quote strings that clearly > don't need it, so that the output from initdb doesn't become uglier than > it was before in typical cases where quoting is not needed. A couple of problems with this: The not-quoting-if-not-needed doesn't appear to do anything useful for me: 'pg-install/bin/pg_ctl' -D 'pg-install/var/data' -l logfile start The indentation of that line was changed from 4 to 10. I don't think that was a good change. As just mentioned elsewhere, this accidentally introduces a failure if the PostgreSQL installation path contains LF/CR, because of the use of appendShellString(). -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, 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