mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Fix comment for MAX_BACKENDS.
This comment mentions that we check that the configured number of backends does not exceed MAX_BACKENDS in RegisterBackgroundWorker() and relevant GUC check hooks, neither of which has those checks anymore. To fix, adjust this comment to say that we do the check in InitializeMaxBackends(). Oversights in commits6bc8ef0b7f
and0b1fe1413e
. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/Z7zOEzz8lNjaU9yf%40nathan
This commit is contained in:
@ -32,8 +32,8 @@ typedef int ProcNumber;
|
|||||||
* currently realistic configurations. Even if that limitation were removed,
|
* currently realistic configurations. Even if that limitation were removed,
|
||||||
* we still could not a) exceed 2^23-1 because inval.c stores the ProcNumber
|
* we still could not a) exceed 2^23-1 because inval.c stores the ProcNumber
|
||||||
* as a 3-byte signed integer, b) INT_MAX/4 because some places compute
|
* as a 3-byte signed integer, b) INT_MAX/4 because some places compute
|
||||||
* 4*MaxBackends without any overflow check. This is rechecked in the
|
* 4*MaxBackends without any overflow check. We check that the configured
|
||||||
* relevant GUC check hooks and in RegisterBackgroundWorker().
|
* number of backends does not exceed MAX_BACKENDS in InitializeMaxBackends().
|
||||||
*/
|
*/
|
||||||
#define MAX_BACKENDS_BITS 18
|
#define MAX_BACKENDS_BITS 18
|
||||||
#define MAX_BACKENDS ((1U << MAX_BACKENDS_BITS)-1)
|
#define MAX_BACKENDS ((1U << MAX_BACKENDS_BITS)-1)
|
||||||
|
Reference in New Issue
Block a user