Re: remove check hooks for GUCs that contribute to MaxBackends
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2024-06-19T19:09:36Z
Lists: pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes: > While working on an idea from another thread [0], I noticed that each of > max_connections, max_worker_process, max_autovacuum_workers, and > max_wal_senders have a check hook that verifies the sum of those GUCs does > not exceed a certain value. Then, in InitializeMaxBackends(), we do the > same check once more. Not only do the check hooks seem redundant, but I > think they might sometimes be inaccurate since some values might not yet be > initialized. Yeah, these per-variable checks are inherently bogus. If we can get of them and make the net user experience actually better, that's a win-win. It seems easier to do for these because they can't change after server start, so there can be one well-defined time to apply the consistency check. IIRC, we have some similar issues in other hooks for variables that aren't PGC_POSTMASTER, so it's harder to see how we might get rid of their cross-checks. That doesn't make them less bogus though. regards, tom lane
Commits
-
Remove check hooks for GUCs that contribute to MaxBackends.
- 0b1fe1413ea8 18.0 landed