Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aHG7S-0002Cu-SY for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Jan 2016 19:21:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aHG7S-0004fA-FA for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Jan 2016 19:21:10 +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) (envelope-from ) id 1aHG7R-0004eC-Th for pgsql-bugs@postgresql.org; Thu, 07 Jan 2016 19:21:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHG7O-0003gl-Ly for pgsql-bugs@postgresql.org; Thu, 07 Jan 2016 19:21:09 +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 u07JKwna014650; Thu, 7 Jan 2016 14:20:58 -0500 From: Tom Lane To: John R Pierce cc: NBoardman@idtus.com, pgsql-bugs@postgresql.org Subject: Re: BUG #13853: initdb to UNC path In-reply-to: <568EB32F.7060001@hogranch.com> References: <20160107161434.8698.95754@wrigleys.postgresql.org> <568EB32F.7060001@hogranch.com> Comments: In-reply-to John R Pierce message dated "Thu, 07 Jan 2016 10:49:19 -0800" Date: Thu, 07 Jan 2016 14:20:58 -0500 Message-ID: <14649.1452194458@sss.pgh.pa.us> 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 John R Pierce writes: > On 1/7/2016 8:14 AM, NBoardman@idtus.com wrote: >> fixing permissions on existing directory //localhost/Users/nboardman/test >> ... ok >> >> creating subdirectories ... initdb: could not create directory >> "//localhost/Users": File exists Hm. AFAICS, this failure must have occurred inside pg_mkdir_p, and what it implies is that stat(2) either failed entirely for "//localhost/Users", or claimed it isn't a directory. Either one seems more like a system problem than our problem. > does it work if you leave out the \\localhost part? using network > paths for database storage is NOT recommended. This is true, and it's not an unreasonable bet that stat() is misbehaving because it's a network path. Having said that, I wonder why initdb is coded to use pg_mkdir_p rather than plain mkdir for creating subdirectories after the datadir has been created. There is basically no advantage there, and there's certainly scope for things to go wrong, as this example shows. 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