Re: Cygwin-Postgres-IpcMemoryCreate - Mailing list pgsql-cygwin

From Barry Pederson
Subject Re: Cygwin-Postgres-IpcMemoryCreate
Date
Msg-id 3CCD7C8C.8030902@barryp.org
Whole thread Raw
In response to Cygwin-Postgres-IpcMemoryCreate  (Saravanan Bellan <SBellan@jareva.com>)
Responses Re: Cygwin-Postgres-IpcMemoryCreate
List pgsql-cygwin
I've been fighting with moving a PostgreSQL database from 7.1.3 to 7.2.1, on a
Win2k SP2 box with NTFS cygwin 1.3.10, cygipc , and found that the backend
would stop on me everytime pg_restore tried to restore a very large
largeobject (like 100+ Megabytes).  The error displayed would be:

-------
FATAL 2:  link from /d/postgresql_data/pg_xlog/0000000000000047 to /d/postgresql
_data/pg_xlog/000000000000004F (initialization of log file 0, segment 79)
failed: Permission denied
-------

After poking around in the source, I came up with the basically the same patch
I now see you guys were discussing just recently on the pgsql-cygwin archives,
where src/backend/access/transam/xlog.c is altered to use rename() instead of
link()/unlink() - as BeOS does.

So if people need another way to reproduce the problem, one way at least for
me is to create a new database, import a single extremely large (100+mb)
object, pg_dump it with something like: pg_dump -b -Ft -f foo.pgdump.tar
mydbname, and then try to restore it with something like: pg_restore -Ft -d
mydbname foo.pgdump.tar

It'll only take one or two tries for the backend to bail out.

So maybe there is something funky going on with link/unlink, and rename would
be a better choice on cygwin.

    Barry


pgsql-cygwin by date:

Previous
From: Jason Tishler
Date:
Subject: Re: hello
Next
From: Infodine
Date:
Subject: plpgsql won't work