Re: IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not enough memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Murali Mohan Kasetty <kasetty(at)india(dot)hp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not enough memory
Date: 2002-10-22 14:36:57
Message-ID: 18822.1035297417@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Murali Mohan Kasetty <kasetty(at)india(dot)hp(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Leif Jensen 2002-10-22 14:41:10 Linking 2 or more databases.
Previous Message Andrew Sullivan 2002-10-22 14:34:42 Re: Hot Backup