forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3057465
committed
Replace the sorted array of GUC variables with a hash table.
This gets rid of bsearch() in favor of hashed lookup. The mainadvantage is that it becomes far cheaper to add new GUCs, sincewe needn't re-sort the pointer array. Adding N new GUCs hadbeen O(N^2 log N), but now it's closer to O(N). We need tosort only in SHOW ALL and equivalent functions, which arehopefully not performance-critical to anybody.Also, merge GetNumConfigOptions() into get_guc_variables(),because in a world where the set of GUCs isn't fairly staticyou really want to consider those two results as tied togethernot independent.Discussion:https://postgr.es/m/2982579.1662416866@sss.pgh.pa.us1 parent407b50f commit3057465
File tree
5 files changed
+272
-160
lines changed- src
- backend/utils/misc
- include/utils
5 files changed
+272
-160
lines changed0 commit comments
Comments
(0)