Re: BUG #13853: initdb to UNC path

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #13853: initdb to UNC path
Дата
Msg-id 14649.1452194458@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #13853: initdb to UNC path  (John R Pierce <pierce@hogranch.com>)
Ответы Re: BUG #13853: initdb to UNC path  (Nuri Boardman <NBoardman@idtus.com>)
Список pgsql-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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: BUG #13853: initdb to UNC path
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: BUG #13850: Need a parameter added similar to "edb_stmt_level_tx"