Re: long sql "in" clause crashes server process (8.0 Release)

"Magnus Hagander" <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
>> Can we increase that setting during the Windows build?  I'd like to
>see
>> it set to 4Mb if possible.
>
>Yes.  Also, if the poster happens to have visual studio 
>installed, there
>is a utility called editbin that allows manually changing a stack (be
>sure to change postgres.exe and postmaster.exe at the least).
>
>The linker switch to do this is:
>
>The Stack Allocations (/STACK:reserve[,commit]) option sets the size of
>the stack in bytes. 
> 

On MingW, you add:
-Wl,--stack=4194304

to get 4Mb stack. At least the value increases in the header. 

And I can confirm that doing this fixes the problem and turns it into
the error message about stack size. (But won't things crash again if I
increase that one? Or will it increase the stack manually then?)

Patch attached.

>> BTW, what's the difference between "stack reserve" and 
>"stack commit"?
>
>Just guessing, but this may have something to do with controlling how
>much of the stack can be swapped out to virtual memory.  I'd suggest
>leaving it alone.

IIRC:
Stack Reserve = Amount of virtual memory used for stack
Stack Commit = Initial/minimal amount of physical memory used for stack

//Magnus


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [email protected])
stack.patch (application/octet-stream, 1.1 KB)
Index: backend/Makefile
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/Makefile,v
retrieving revision 1.107
diff -c -r1.107 Makefile
*** backend/Makefile	31 Dec 2004 19:09:37 -0000	1.107
--- backend/Makefile	24 Jan 2005 21:07:40 -0000
***************
*** 65,71 ****
  	$(DLLTOOL) --dllname $@$(X) --output-exp [email protected] --def postgres.def
  	$(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) -Wl,--base-file,[email protected] [email protected] $(OBJS) $(WIN32RES) $(LIBS)
  	$(DLLTOOL) --dllname $@$(X) --base-file [email protected] --output-exp [email protected] --def postgres.def
! 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) [email protected] $(OBJS) $(WIN32RES) $(LIBS)
  	rm -f [email protected] [email protected]
  
  postgres.def: $(OBJS)
--- 65,71 ----
  	$(DLLTOOL) --dllname $@$(X) --output-exp [email protected] --def postgres.def
  	$(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) -Wl,--base-file,[email protected] [email protected] $(OBJS) $(WIN32RES) $(LIBS)
  	$(DLLTOOL) --dllname $@$(X) --base-file [email protected] --output-exp [email protected] --def postgres.def
! 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) [email protected] $(OBJS) $(WIN32RES) $(LIBS) -Wl,--stack=4194304
  	rm -f [email protected] [email protected]
  
  postgres.def: $(OBJS)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.