Cache opaque handle for GUC option to avoid repeasted lookups.
authorJeff Davis <jdavis@postgresql.org>
Fri, 8 Dec 2023 19:16:01 +0000 (11:16 -0800)
committerJeff Davis <jdavis@postgresql.org>
Fri, 8 Dec 2023 19:16:01 +0000 (11:16 -0800)
commit867dd2dc8704e58636b8599f61ada3d83c7e6473
treedb81dcac5eef5d9d54dc2c5739808f50beb59907
parentc9c0589fda0edc46b8f5e7362b04636c0c4f0723
Cache opaque handle for GUC option to avoid repeasted lookups.

When setting GUCs from proconfig, performance is important, and hash
lookups in the GUC table are significant.

Per suggestion from Robert Haas.

Discussion: https://postgr.es/m/CA+TgmoYpKxhR3HOD9syK2XwcAUVPa0+ba0XPnwWBcYxtKLkyxA@mail.gmail.com
Reviewed-by: John Naylor
src/backend/utils/fmgr/fmgr.c
src/backend/utils/misc/guc.c
src/include/utils/guc.h
src/tools/pgindent/typedefs.list