From: Tom Lane <tgl@sss.pgh.pa.us>
To: John R Pierce <pierce@hogranch.com>
Cc: NBoardman@idtus.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13853: initdb to UNC path
Date: Thu, 07 Jan 2016 14:20:58 -0500
Message-ID: <14649.1452194458@sss.pgh.pa.us> (raw)
In-Reply-To: <568EB32F.7060001@hogranch.com>
References: <20160107161434.8698.95754@wrigleys.postgresql.org>
<568EB32F.7060001@hogranch.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
John R Pierce <pierce@hogranch.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, pierce@hogranch.com, NBoardman@idtus.com
Subject: Re: BUG #13853: initdb to UNC path
In-Reply-To: <14649.1452194458@sss.pgh.pa.us>
References: <20160107161434.8698.95754@wrigleys.postgresql.org> <568EB32F.7060001@hogranch.com> <14649.1452194458@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox