Skip to content

Commit c56e8af

Browse files
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 commits 6bc8ef0 and 0b1fe14. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/Z7zOEzz8lNjaU9yf%40nathan
1 parent e87c14b commit c56e8af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/include/storage/procnumber.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ typedef int ProcNumber;
3232
* currently realistic configurations. Even if that limitation were removed,
3333
* we still could not a) exceed 2^23-1 because inval.c stores the ProcNumber
3434
* as a 3-byte signed integer, b) INT_MAX/4 because some places compute
35-
* 4*MaxBackends without any overflow check. This is rechecked in the
36-
* relevant GUC check hooks and in RegisterBackgroundWorker().
35+
* 4*MaxBackends without any overflow check. We check that the configured
36+
* number of backends does not exceed MAX_BACKENDS in InitializeMaxBackends().
3737
*/
3838
#define MAX_BACKENDS_BITS 18
3939
#define MAX_BACKENDS ((1U << MAX_BACKENDS_BITS)-1)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy