[PATCHES] win32 patch
I have applied the following patch. It was submitted a while ago.: For application to HEAD, following community review. * Changes incorrect CYGWIN defines to __CYGWIN__ * Some localtime returns NULL checks (when unchecked cause SEGVs under Win32 regression tests) * Rationalized CreateSharedMemoryAndSemaphores and AttachSharedMemoryAndSemaphores (Bruce, I finally remembered to do it); requires attention. Claudio Natoli -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: src/backend/bootstrap/bootstrap.c === RCS file: /projects/cvsroot/pgsql-server/src/backend/bootstrap/bootstrap.c,v retrieving revision 1.175 diff -c -r1.175 bootstrap.c *** src/backend/bootstrap/bootstrap.c 7 Jan 2004 18:56:25 - 1.175 --- src/backend/bootstrap/bootstrap.c 5 Feb 2004 12:36:15 - *** *** 428,434 #ifdef EXEC_BACKEND if (IsUnderPostmaster) ! AttachSharedMemoryAndSemaphores(); #endif XLOGPathInit(); --- 428,434 #ifdef EXEC_BACKEND if (IsUnderPostmaster) ! CreateSharedMemoryAndSemaphores(false, MaxBackends, 0); #endif XLOGPathInit(); Index: src/backend/commands/user.c === RCS file: /projects/cvsroot/pgsql-server/src/backend/commands/user.c,v retrieving revision 1.136 diff -c -r1.136 user.c *** src/backend/commands/user.c 2 Feb 2004 17:21:07 - 1.136 --- src/backend/commands/user.c 5 Feb 2004 12:36:16 - *** *** 139,149 bufsize = strlen(filename) + 12; tempname = (char *) palloc(bufsize); snprintf(tempname, bufsize, %s.%d, filename, MyProcPid); ! #if defined(WIN32) || defined(CYGWIN) filename = repalloc(filename, strlen(filename) + 1 + strlen(.new)); strcat(filename, .new); #endif ! oumask = umask((mode_t) 077); fp = AllocateFile(tempname, w); umask(oumask); --- 139,149 bufsize = strlen(filename) + 12; tempname = (char *) palloc(bufsize); snprintf(tempname, bufsize, %s.%d, filename, MyProcPid); ! #if defined(WIN32) || defined(__CYGWIN__) filename = repalloc(filename, strlen(filename) + 1 + strlen(.new)); strcat(filename, .new); #endif ! oumask = umask((mode_t) 077); fp = AllocateFile(tempname, w); umask(oumask); *** *** 290,296 bufsize = strlen(filename) + 12; tempname = (char *) palloc(bufsize); snprintf(tempname, bufsize, %s.%d, filename, MyProcPid); ! #if defined(WIN32) || defined(CYGWIN) filename = repalloc(filename, strlen(filename) + 1 + strlen(.new)); strcat(filename, .new); #endif --- 290,296 bufsize = strlen(filename) + 12; tempname = (char *) palloc(bufsize); snprintf(tempname, bufsize, %s.%d, filename, MyProcPid); ! #if defined(WIN32) || defined(__CYGWIN__) filename = repalloc(filename, strlen(filename) + 1 + strlen(.new)); strcat(filename, .new); #endif *** *** 465,471 user_file_update_needed = false; write_user_file(urel); heap_close(urel, NoLock); ! #if defined(WIN32) || defined(CYGWIN) { /* Rename active file while not holding an exclusive lock */ char *filename = user_getfilename(), *filename_new; --- 465,471 user_file_update_needed = false; write_user_file(urel); heap_close(urel, NoLock); ! #if defined(WIN32) || defined(__CYGWIN__) { /* Rename active file while not holding an exclusive lock */ char *filename = user_getfilename(), *filename_new; *** *** 484,490 group_file_update_needed = false; write_group_file(grel); heap_close(grel, NoLock); ! #if defined(WIN32) || defined(CYGWIN) { /* Rename active file while not holding an exclusive lock */ char *filename = group_getfilename(), *filename_new; --- 484,490 group_file_update_needed = false; write_group_file(grel); heap_close(grel, NoLock); ! #if defined(WIN32) || defined(__CYGWIN__) { /* Rename active file while not holding an exclusive lock */ char *filename = group_getfilename(), *filename_new; Index: src/backend/port/sysv_shmem.c === RCS file:
[PATCHES] win32 patch: Signal delivery when blocking on semaphore
This patch makes the block on semaphore interruptible by signals on win32. Without this, you can't kill a backend when it's waiting on a lock. //Magnus win32_semint.patch Description: win32_semint.patch ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] win32 patch: processCancelRequest/reaper (+ various minor
Patch applied. Thanks. (No, no one calls SendPostmasterSignal that doesn't have the postmaster as a parent.) --- Claudio Natoli wrote: For application to HEAD, pending community review. Briefly, [all] Removed call to getppid in SendPostmasterSignal, replacing with a PostmasterPid variable, which gets set (early) in PostmasterMain - Q: Is this ok? Specifically, does anything call this function where getppid would not be the postmaster? [fork/exec] Implements processCancelRequest by keeping an array of pid/cancel_key structs in shared mem [fork/exec] Moves AttachSharedMemoryAndSemaphores call for backends into SubPostmasterMain [win32] Implements reaper/waitpid by keeping an arrays of children pids,handles in postmaster local mem - this item is largely untested, for reasons which should be obvious, but appears sound [win32/all] Added extern for pgpipe in Win32 case, and changed the second pipe call (which seems to have been missed earlier) to pgpipe [win32] #define'd ftruncate to chsize in the Win32 case [win32] PG_USLEEP for Win32 has a misplaced paren. Fixed. [win32] DLLIMPORT handling for MingW case Cheers, Claudio --- 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 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] win32 patch: processCancelRequest/reaper (+ various minor cha
This time with a patch actually attached [doh!] -Original Message- From: Claudio Natoli Sent: Monday, 12 January 2004 6:45 PM To: '[EMAIL PROTECTED]' Subject: win32 patch: processCancelRequest/reaper (+ various minor changes) For application to HEAD, pending community review. Briefly, [all] Removed call to getppid in SendPostmasterSignal, replacing with a PostmasterPid variable, which gets set (early) in PostmasterMain - Q: Is this ok? Specifically, does anything call this function where getppid would not be the postmaster? [fork/exec] Implements processCancelRequest by keeping an array of pid/cancel_key structs in shared mem [fork/exec] Moves AttachSharedMemoryAndSemaphores call for backends into SubPostmasterMain [win32] Implements reaper/waitpid by keeping an arrays of children pids,handles in postmaster local mem - this item is largely untested, for reasons which should be obvious, but appears sound [win32/all] Added extern for pgpipe in Win32 case, and changed the second pipe call (which seems to have been missed earlier) to pgpipe [win32] #define'd ftruncate to chsize in the Win32 case [win32] PG_USLEEP for Win32 has a misplaced paren. Fixed. [win32] DLLIMPORT handling for MingW case Cheers, Claudio --- 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 diff7c.out Description: Binary data ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [PATCHES] Win32 patch for Makefile.shlib
Patch applied. Thanks. --- Claudio Natoli wrote: If this is acceptable, I'll send a similar one for src/backend/Makefile Cheers, Claudio --- WE HAVE MOVED - PLEASE NOTE OUR NEW CONTACT DETAILS: THE BASEMENT, 33 EWELL STREET, BALMAIN NSW 2041 TEL: +61 2 9555 1544 FAX: +61 2 9555 6911 Certain disclaimers and policies apply to all email sent from Memetrics. For the full text of these disclaimers and policies see http://www.memetrics.com/emailpolicy.html [ Attachment, skipping... ] ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] Win32 patch for Makefile.shlib
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --- Claudio Natoli wrote: If this is acceptable, I'll send a similar one for src/backend/Makefile Cheers, Claudio --- WE HAVE MOVED - PLEASE NOTE OUR NEW CONTACT DETAILS: THE BASEMENT, 33 EWELL STREET, BALMAIN NSW 2041 TEL: +61 2 9555 1544 FAX: +61 2 9555 6911 Certain disclaimers and policies apply to all email sent from Memetrics. For the full text of these disclaimers and policies see http://www.memetrics.com/emailpolicy.html [ Attachment, skipping... ] ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [PATCHES] Win32 patch for Makefile.shlib
Of course, this only applied to head, no 7.4. Yes, that's correct. (strictly, at the time of creation, I was working off the WIN32_DEV branch...) --- 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 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] Win32 patch for Makefile.shlib
Claudio Natoli wrote: Of course, this only applied to head, no 7.4. Yes, that's correct. (strictly, at the time of creation, I was working off the WIN32_DEV branch...) OK. You said you had some backend/Makefile stuff too. Please check CVS head first because I dealt with ln -s and some missing $(X) already. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html