Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation
От | Andres Freund |
---|---|
Тема | Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation |
Дата | |
Msg-id | 20140404190403.GA27702@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation ("MauMau" <maumau307@gmail.com>) |
Список | pgsql-hackers |
On 2014-03-25 21:09:13 +0900, MauMau wrote: > ! /* > ! * Remove old symlink in recovery, in case it points to the wrong place. > ! * On Windows, lstat() reports junction points as directories. > ! */ > if (InRecovery) > { > ! if (lstat(linkloc, &st) == 0 && S_ISDIR(st.st_mode)) > ! { > ! if (rmdir(linkloc) < 0) > ! ereport(ERROR, > ! (errcode_for_file_access(), > ! errmsg("could not remove directory \"%s\": %m", > ! linkloc))); > ! } > ! else > ! { > ! if (unlink(linkloc) < 0 && errno != ENOENT) > ! ereport(ERROR, > ! (errcode_for_file_access(), > ! errmsg("could not remove symbolic link \"%s\": %m", > ! linkloc))); > ! } > } if (..) ... else { if (...) ... } is pretty odd code layout. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: