提交 8251e0b2 编写于 作者: T Tom Lane

Increase MAXLISTEN to a more generous value, and add an error message

telling when it has been exceeded.  Per trouble report from
Jean-GÅrard Pailloncy.
上级 6bb51348
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.174 2004/12/31 21:59:50 pgsql Exp $ * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.175 2005/01/12 16:38:17 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -298,7 +298,9 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, ...@@ -298,7 +298,9 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
} }
if (listen_index >= MaxListen) if (listen_index >= MaxListen)
{ {
/* Nothing found. */ ereport(LOG,
(errmsg("could not bind to all requested addresses: MAXLISTEN (%d) exceeded",
MaxListen)));
break; break;
} }
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.442 2004/12/31 22:00:40 pgsql Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.443 2005/01/12 16:38:17 tgl Exp $
* *
* NOTES * NOTES
* *
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
#include <DNSServiceDiscovery/DNSServiceDiscovery.h> #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
#endif #endif
#include "catalog/pg_control.h"
#include "catalog/pg_database.h" #include "catalog/pg_database.h"
#include "commands/async.h" #include "commands/async.h"
#include "lib/dllist.h" #include "lib/dllist.h"
...@@ -167,7 +168,7 @@ int ReservedBackends; ...@@ -167,7 +168,7 @@ int ReservedBackends;
static const char *progname = NULL; static const char *progname = NULL;
/* The socket(s) we're listening to. */ /* The socket(s) we're listening to. */
#define MAXLISTEN 10 #define MAXLISTEN 64
static int ListenSocket[MAXLISTEN]; static int ListenSocket[MAXLISTEN];
/* /*
...@@ -337,8 +338,8 @@ typedef struct ...@@ -337,8 +338,8 @@ typedef struct
#endif #endif
char my_exec_path[MAXPGPATH]; char my_exec_path[MAXPGPATH];
char ExtraOptions[MAXPGPATH]; char ExtraOptions[MAXPGPATH];
char lc_collate[MAXPGPATH]; char lc_collate[LOCALE_NAME_BUFLEN];
char lc_ctype[MAXPGPATH]; char lc_ctype[LOCALE_NAME_BUFLEN];
} BackendParameters; } BackendParameters;
static void read_backend_variables(char *id, Port *port); static void read_backend_variables(char *id, Port *port);
...@@ -3682,8 +3683,8 @@ save_backend_variables(BackendParameters *param, Port *port, ...@@ -3682,8 +3683,8 @@ save_backend_variables(BackendParameters *param, Port *port,
StrNCpy(param->ExtraOptions, ExtraOptions, MAXPGPATH); StrNCpy(param->ExtraOptions, ExtraOptions, MAXPGPATH);
StrNCpy(param->lc_collate, setlocale(LC_COLLATE, NULL), MAXPGPATH); StrNCpy(param->lc_collate, setlocale(LC_COLLATE, NULL), LOCALE_NAME_BUFLEN);
StrNCpy(param->lc_ctype, setlocale(LC_CTYPE, NULL), MAXPGPATH); StrNCpy(param->lc_ctype, setlocale(LC_CTYPE, NULL), LOCALE_NAME_BUFLEN);
return true; return true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册