diff options
author | Nathan Bossart <nathan@postgresql.org> | 2025-02-24 15:02:09 -0600 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2025-02-24 15:02:09 -0600 |
commit | c56e8af75e081383e05cf544f372506c8da4efe7 (patch) | |
tree | 645323ac91188d8a221f009ad11549373601f458 /src | |
parent | e87c14b19ed458f6e07d2df338e5000453ad785d (diff) | |
download | postgresql-c56e8af75e081383e05cf544f372506c8da4efe7.tar.gz postgresql-c56e8af75e081383e05cf544f372506c8da4efe7.zip |
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 6bc8ef0b7f and 0b1fe1413e.
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/Z7zOEzz8lNjaU9yf%40nathan
Diffstat (limited to 'src')
-rw-r--r-- | src/include/storage/procnumber.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/storage/procnumber.h b/src/include/storage/procnumber.h index 75c2c7a17c0..2ddaaf0c646 100644 --- a/src/include/storage/procnumber.h +++ b/src/include/storage/procnumber.h @@ -32,8 +32,8 @@ typedef int ProcNumber; * currently realistic configurations. Even if that limitation were removed, * 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 - * 4*MaxBackends without any overflow check. This is rechecked in the - * relevant GUC check hooks and in RegisterBackgroundWorker(). + * 4*MaxBackends without any overflow check. We check that the configured + * number of backends does not exceed MAX_BACKENDS in InitializeMaxBackends(). */ #define MAX_BACKENDS_BITS 18 #define MAX_BACKENDS ((1U << MAX_BACKENDS_BITS)-1) |