git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 407b50f) | patch
Replace the sorted array of GUC variables with a hash table.
2022年10月14日 16:26:39 +0000 (12:26 -0400)
2022年10月14日 16:26:39 +0000 (12:26 -0400)
commit 3057465acfbea2f3dd7a914a1478064022c6eecd
Replace the sorted array of GUC variables with a hash table.

This gets rid of bsearch() in favor of hashed lookup. The main
advantage is that it becomes far cheaper to add new GUCs, since
we needn't re-sort the pointer array. Adding N new GUCs had
been O(N^2 log N), but now it's closer to O(N). We need to
sort only in SHOW ALL and equivalent functions, which are
hopefully not performance-critical to anybody.

Also, merge GetNumConfigOptions() into get_guc_variables(),
because in a world where the set of GUCs isn't fairly static
you really want to consider those two results as tied together
not independent.

Discussion: https://postgr.es/m/2982579.1662416866@sss.pgh.pa.us
src/backend/utils/misc/guc.c diff | blob | blame | history
src/backend/utils/misc/guc_funcs.c diff | blob | blame | history
src/backend/utils/misc/help_config.c diff | blob | blame | history
src/include/utils/guc.h diff | blob | blame | history
src/include/utils/guc_tables.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /