Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T8xlZ-0003Kj-TQ for pgsql-bugs@postgresql.org; Tue, 04 Sep 2012 18:22:26 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T8xlV-0007s1-NS for pgsql-bugs@postgresql.org; Tue, 04 Sep 2012 18:22:24 +0000 Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 7CCA8207C2; Tue, 4 Sep 2012 14:22:19 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute6.internal (MEProxy); Tue, 04 Sep 2012 14:22:19 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:subject:from:to:cc:date :in-reply-to:references:content-type:mime-version :content-transfer-encoding; s=smtpout; bh=s/ehATC+tKEKJW6kAvWdMI iXdds=; b=UL08rf0/tGlN1O06xIMG8IbF+UfatD2si53ekgEMuD7wXCg/2RQW54 p2xphrwyGPz5TfslX+iwgbmrCFuPl108FgctWPIklIAVSHEsRqD+1ZYq1jfFfFHZ miYvRZpHugcKHBUVa2B4EU11Qzldc1D+3TsElcvOnNoo/zztT95tE= X-Sasl-enc: Ob5Ovy7PXbPfsub+uuDf0FGzTurDGBbIE+nPdUVKId5M 1346782939 Received: from [192.168.178.34] (unknown [88.217.83.152]) by mail.messagingengine.com (Postfix) with ESMTPA id BBB984836E8; Tue, 4 Sep 2012 14:22:18 -0400 (EDT) Message-ID: <1346782937.12346.21.camel@murayc-x220.fritz.box> Subject: Re: BUG #7514: postgres -k no longer works with spaces in the path From: Murray Cumming To: Tom Lane Cc: pgsql-bugs@postgresql.org Date: Tue, 04 Sep 2012 20:22:17 +0200 In-Reply-To: <16738.1346769101@sss.pgh.pa.us> References: <16738.1346769101@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.3 (3.4.3-2.fc17) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201209/28 X-Sequence-Number: 34023 On Tue, 2012-09-04 at 10:31 -0400, Tom Lane wrote: > murrayc@murrayc.com writes: > > At some point, probably in 9.1.5, the -k option to Postgres ("Unix-domain > > socket location" in --help), stopped accepting paths that contain spaces. > > > For instance, > > -k '/tmp/testglom2FPDKW/path with spaces/some_postgres_data' > > > It now fails with this error: > > FATAL: invalid list syntax for "unix_socket_directories" > > Ah, you're using the latest Fedora packaging of 9.1.x, which includes a > back-ported version of the unix_socket_directories change that's in > HEAD. -k now effectively takes a list of directory names, not just > one, and it's pickier about whitespace. > > IIRC, you can make it work if you put double quotes around the > space-containing name, so it'd look like this: > > -k '"/blah blah blah"' Yes, thanks, that works for spaces, though it's rather odd. However, how should I now specify a path that has a " or a /, or \, which now cause similar errors with -k? Previously I could just use g_shell_quote() and forget about it: http://developer.gnome.org/glib/stable/glib-Shell-related-Utilities.html#g-shell-quote To be honest, I don't have much interest in, or understanding of, this -k option anyway. I just use it because, when starting my temporary postgresql instance, it otherwise defaults to /var/run/postgresql/ (at least in this distro build) which is not available to normal users. I currently just specify the same directory that the postgresql data is in. Maybe I should just use /tmp instead. -- murrayc@murrayc.com www.murrayc.com www.openismus.com