mirror of
https://github.com/postgres/postgres.git
synced 2025-12-04 12:02:48 +03:00
Allow maximum number of backends to be set at configure time
(--with-maxbackends). Add a postmaster switch (-N backends) that allows the limit to be reduced at postmaster start time. (You can't increase it, sorry to say, because there are still some fixed-size arrays.) Grab the number of semaphores indicated by min(MAXBACKENDS, -N) at postmaster startup, so that this particular form of bogus configuration is exposed immediately rather than under heavy load.
This commit is contained in:
@@ -255,7 +255,16 @@ AC_ARG_WITH(
|
||||
AC_DEFINE_UNQUOTED(DEF_PGPORT, "5432") AC_MSG_RESULT(5432)
|
||||
)
|
||||
|
||||
dnl We exclude tcl support unless we override it with --with-tcl
|
||||
dnl MAXBACKENDS can be set by --with-maxbackends. Default value is 64.
|
||||
AC_MSG_CHECKING(setting MAXBACKENDS)
|
||||
AC_ARG_WITH(
|
||||
maxbackends,
|
||||
[ --with-maxbackends=<n> set maximum number of server processes ],
|
||||
AC_DEFINE_UNQUOTED(MAXBACKENDS, ${withval}) AC_MSG_RESULT($with_maxbackends),
|
||||
AC_DEFINE_UNQUOTED(MAXBACKENDS, 64) AC_MSG_RESULT(64)
|
||||
)
|
||||
|
||||
dnl We exclude tcl support unless user says --with-tcl
|
||||
AC_MSG_CHECKING(setting USE_TCL)
|
||||
AC_ARG_WITH(
|
||||
tcl,
|
||||
|
||||
Reference in New Issue
Block a user