Re: Fwd: 8.0 Beta3 worked, RC1 didn't!
"Magnus Hagander" <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.devel.win32 |
|---|---|
| Message-ID | <[email protected]> |
>Bruce Momjian <[email protected]> writes: >> What if we malloc 100k just before we create the postmaster >segment and >> then free it and see if that fixes the postgres.exe problem? > >That was suggested already. As a permanent fix it's certainly >unspeakably ugly, but it would be useful to try it just to prove >(or disprove) that we understand the problem. > >It would probably be a good idea to make the padding at least 256K, >since the numbers that have been tossed around seem to indicate that >Windows may be aligning things on 128K boundaries. > >My inclination for a permanent fix would be to try to do the shmat() >much earlier, but I don't think we should go to the effort of doing >that code rearrangement until we've proven that this is indeed the >issue. Still unable to reproduce this, even with the more detailed steps in Nicolas mail. However, I've created a postgres.exe based on cvs-as-of-yesterday plus the attached patch for testing. The file is available on http://www.hagander.net/pgsql/postgres_shmem.zip Nicolas and Merlin - can you test with this .exe, please? You need to replace *both* postmaster.exe *and* postgres.exe with the new one. //Magnus ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
shmem.patch
(application/octet-stream, 744 B)
Index: postmaster/postmaster.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/postmaster/postmaster.c,v retrieving revision 1.440 diff -c -r1.440 postmaster.c *** postmaster/postmaster.c 17 Nov 2004 08:30:09 -0000 1.440 --- postmaster/postmaster.c 28 Dec 2004 17:57:57 -0000 *************** *** 1771,1777 **** --- 1771,1785 ---- * used to determine IPC keys. This helps ensure that we will clean * up dead IPC objects if the postmaster crashes and is restarted. */ + + #ifdef WIN32 + /* ugly ugly ugly ugly */ + void *dummy = malloc(256*1024); + #endif CreateSharedMemoryAndSemaphores(false, MaxBackends, port); + #ifdef WIN32 + free(dummy); + #endif }