mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
Fix upper limit of superuser_reserved_connections, add limit for wal_senders
Should be limited to the maximum number of connections excluding autovacuum workers, not including. Add similar check for max_wal_senders, which should never be higher than max_connections.
This commit is contained in:
@ -759,11 +759,16 @@ PostmasterMain(int argc, char *argv[])
|
||||
/*
|
||||
* Check for invalid combinations of GUC settings.
|
||||
*/
|
||||
if (ReservedBackends >= MaxBackends)
|
||||
if (ReservedBackends >= MaxConnections)
|
||||
{
|
||||
write_stderr("%s: superuser_reserved_connections must be less than max_connections\n", progname);
|
||||
ExitPostmaster(1);
|
||||
}
|
||||
if (max_wal_senders >= MaxConnections)
|
||||
{
|
||||
write_stderr("%s: max_wal_senders must be less than max_connections\n", progname);
|
||||
ExitPostmaster(1);
|
||||
}
|
||||
if (XLogArchiveMode && wal_level == WAL_LEVEL_MINIMAL)
|
||||
ereport(ERROR,
|
||||
(errmsg("WAL archival (archive_mode=on) requires wal_level \"archive\" or \"hot_standby\"")));
|
||||
|
Reference in New Issue
Block a user