Re: [HACKERS] Another crack at doing a Win3

From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
To: 'Bruce Momjian' <pgman(at)candle(dot)pha(dot)pa(dot)us>, Dann Corbit <DCorbit(at)connx(dot)com>
Cc: PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [HACKERS] Another crack at doing a Win3
Date: 2004-03-05 03:39:13
Message-ID: A02DEC4D1073D611BAE8525405FCCE2B55F357@harris.memetrics.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32


Dan Corbit wrote:
> dcorbit(at)DANNFAST /usr/local/pgsql/bin
> $ postmaster -D u:/pgdata
> LOG: select() failed in postmaster: No such file or directory

Add the -i flag, or set tcpip_socket to true in postgresql.conf

> dcorbit(at)DANNFAST /usr/local/pgsql/bin
> $ FATAL: could not attach to proper memory at fixed address:
> shmget(key=5432001, addr=00E10000) failed: No such file or directory

As Bruce says, this looks like a child was unable to map to the same address
as the parent. Looking at the code, I'd had some concerns that this would
occur, but was unable to ever cause it under win32 (I have been able to
reproduce in the EXEC_BACKEND case under cygwin, however).

I'll add this item to the win32 TODO list.

Cheers,
Claudio

PS. If you want to continue to have a play around with the port, a 'fix'
(near as I can tell) would be to set UsedShmemSegAddr to some fixed address
in PGSharedMemoryCreate, in sysv_shmem.c/pg_shmem.c, after the lines:

/* Make sure PGSharedMemoryAttach doesn't fail without need */
UsedShmemSegAddr = NULL;

It'll need to be a multiple of 64K, and, you may have to hunt for a good
choice. Like I said, only if you're interested in having a play.

---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2004-03-05 03:42:27 Re: [HACKERS] Another crack at doing a Win32 build under MINGW
Previous Message Dann Corbit 2004-03-05 03:27:24 Re: [HACKERS] Another crack at doing a Win32 build under MINGW