Murali Mohan Kasetty <kasetty@india.hp.com> writes:
> I am using PostgreSQL version 7.2 in WIndows 2000.
> FATAL 2: link from /usr/local/pgsql/data/pg_xlog/0000000000000019 to
> /usr/local
> /pgsql/data/pg_xlog/000000000000001F (initialization of log file 0,
> segment
> 31)
> failed: Permission denied
There is a post-7.2 change in src/backend/access/transam/xlog.c that
seems relevant. The code causing this error report is
/*
* Prefer link() to rename() here just to be really sure that we don't
* overwrite an existing logfile. However, there shouldn't be one, so
* rename() is an acceptable substitute except for the truly paranoid.
*/
#ifndef __BEOS__
if (link(tmppath, path) < 0)
elog(STOP, "link from %s to %s (initialization of log file %u, segment %u) failed: %m",
tmppath, path, log, seg);
unlink(tmppath);
#else
if (rename(tmppath, path) < 0)
elog(STOP, "rename from %s to %s (initialization of log file %u, segment %u) failed: %m",
tmppath, path, log, seg);
#endif
and in 7.3 the #ifndef has become
#if !defined(__BEOS__) && !defined(N_PLAT_NLM) && !defined(__CYGWIN__)
so it would seem that link() doesn't work on CYGWIN either. I'd suggest
altering the 7.2 code this way and recompiling.
regards, tom lane