Cache opaque handle for GUC option to avoid repeasted lookups.

Jeff Davis <jdavis@postgresql.org>

Commit: 867dd2dc8704e58636b8599f61ada3d83c7e6473
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2023-12-08T19:16:01Z
Releases: 17.0
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

Files

PathChange+/−
src/backend/utils/fmgr/fmgr.c modified +24 −7
src/backend/utils/misc/guc.c modified +50 −7
src/include/utils/guc.h modified +9 −0
src/tools/pgindent/typedefs.list modified +1 −0

Discussion