of link() under Cygwin:
http://archives.postgresql.org/pgsql-cygwin/2002-04/msg00072.php
Note that it appears that BeOS and Netware also have the above or
similar problem.
I have only verified that PostgreSQL builds under Cygwin with this
patch.
Since I cannot reproduce the problem, I cannot verify that the proposed
patch solves it. Nevertheless, both Barry Pederson and David P.
Caldwell
attest that this patch solves the problem. See the following for
details:
http://archives.postgresql.org/pgsql-cygwin/2002-05/msg00043.php
http://archives.postgresql.org/pgsql-cygwin/2002-05/msg00040.php
Jason Tishler
* overwrite an existing logfile. However, there shouldn't be one, so
* rename() is an acceptable substitute except for the truly paranoid.
*/
-#if !defined(__BEOS__) && !defined(N_PLAT_NLM)
+#if !defined(__BEOS__) && !defined(N_PLAT_NLM) && !defined(__CYGWIN__)
if (link(tmppath, path) < 0)
elog(PANIC, "link from %s to %s (initialization of log file %u, segment %u) failed: %m",
tmppath, path, log, seg);