aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop')
-rw-r--r--src/backend/tcop/Makefile4
-rw-r--r--src/backend/tcop/postgres.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/tcop/Makefile b/src/backend/tcop/Makefile
index e90918716db..200cbad1b23 100644
--- a/src/backend/tcop/Makefile
+++ b/src/backend/tcop/Makefile
@@ -4,7 +4,7 @@
# Makefile for tcop
#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/backend/tcop/Makefile,v 1.25 2003/11/29 19:51:57 pgsql Exp $
+# $PostgreSQL: pgsql/src/backend/tcop/Makefile,v 1.26 2006/10/08 17:15:34 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -14,6 +14,8 @@ include $(top_builddir)/src/Makefile.global
OBJS= dest.o fastpath.o postgres.o pquery.o utility.o
+override CPPFLAGS += -DWIN32_STACK_RLIMIT=$(WIN32_STACK_RLIMIT)
+
all: SUBSYS.o
SUBSYS.o: $(OBJS)
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index e22445b4745..369b40d2052 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.513 2006/10/07 20:16:57 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.514 2006/10/08 17:15:34 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -3678,8 +3678,13 @@ get_stack_depth_rlimit(void)
}
return val;
#else /* no getrlimit */
+#if defined(WIN32) || defined(__CYGWIN__)
+ /* On Windows we set the backend stack size in src/backend/Makefile */
+ return WIN32_STACK_RLIMIT;
+#else /* not windows ... give up */
return -1;
#endif
+#endif
}