Re: IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not enough memory - Mailing list pgsql-general

From Tom Lane
Subject Re: IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not enough memory
Date
Msg-id 18822.1035297417@sss.pgh.pa.us
Whole thread Raw
In response to IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not enough memory  (Murali Mohan Kasetty <kasetty@india.hp.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Leif Jensen
Date:
Subject: Linking 2 or more databases.
Next
From: "Alice Lottini"
Date:
Subject: looking for documentation about the optimizer