postgresql/src/include/utils
Tom Lane f13b2088fa Add auxiliary lists to GUC data structures for better performance.
The previous patch made addition of new GUCs cheap, but other GUC
operations aren't improved and indeed get a bit slower, because
hash_seq_search() is slower than just scanning a pointer array.

However, most performance-critical GUC operations only need
to touch a relatively small fraction of the GUCs; especially
so for AtEOXact_GUC().  We can improve matters at the cost
of a bit more space by adding dlist or slist links to the
GUC data structures.  This patch invents lists that track

(1) all GUCs with non-default "source";

(2) all GUCs with nonempty state stack (implying they've
been changed in the current transaction);

(3) all GUCs due for reporting to the client.

All of guc.c's performance-critical cases can make use of one or
another of these lists to avoid searching the whole hash table.
In particular, the stack list means that transaction end
doesn't take time proportional to the number of GUCs, but
only to the number changed in the current transaction.

Discussion: https://postgr.es/m/2982579.1662416866@sss.pgh.pa.us
2022-10-14 12:36:14 -04:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
aclchk_internal.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
array.h Add construct_array_builtin, deconstruct_array_builtin 2022-07-01 11:23:15 +02:00
arrayaccess.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
ascii.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
attoptcache.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
backend_progress.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
backend_status.h Use actual backend IDs in pg_stat_get_backend_idset() and friends. 2022-09-29 12:14:39 -04:00
builtins.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
bytea.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
cash.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
catcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
combocid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
date.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
datetime.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
datum.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dsa.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dynahash.h Fix various typos, grammar and code style in comments and docs 2022-01-25 09:40:04 +09:00
elog.h Add optional parameter to PG_TRY() macros 2022-10-06 10:08:31 +13:00
evtcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandeddatum.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
expandedrecord.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
float.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
fmgrtab.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
formatting.h Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
freepage.h Fix relptr's encoding of the base address. 2022-06-27 11:34:26 +12:00
geo_decls.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
guc.h Replace the sorted array of GUC variables with a hash table. 2022-10-14 12:26:39 -04:00
guc_hooks.h Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
guc_tables.h Add auxiliary lists to GUC data structures for better performance. 2022-10-14 12:36:14 -04:00
help_config.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
hsearch.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
index_selfuncs.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
inet.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
inval.h Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
json.h Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
jsonb.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
jsonfuncs.h Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
jsonpath.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
logtape.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
lsyscache.h Move common catalog cache access routines to lsyscache.c 2022-08-02 10:47:22 +05:30
memdebug.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
memutils.h Remove MemoryContextContains(). 2022-10-06 13:35:31 -04:00
memutils_internal.h Improve our ability to detect bogus pointers passed to pfree et al. 2022-10-06 21:24:00 -04:00
memutils_memorychunk.h Various cleanups of the new memory context header code 2022-08-31 07:33:54 +12:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
multirangetypes.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
numeric.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
old_snapshot.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
palloc.h Make some minor improvements in memory-context infrastructure. 2022-10-14 11:55:56 -04:00
partcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_crc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_locale.h Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
pg_lsn.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
pg_rusage.h Remove configure probe for sys/resource.h and refactor. 2022-08-14 00:09:47 +12:00
pgstat_internal.h pgstat: Prevent stats reset from corrupting slotname by removing slotname 2022-10-08 09:43:29 -07:00
pidfile.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
plancache.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
portal.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
ps_status.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
queryenvironment.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
queryjumble.h Remove definition of JUMBLE_SIZE from queryjumble.h 2022-10-05 14:27:50 +09:00
rangetypes.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
regproc.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
rel.h Convert macros to static inline functions (rel.h) 2022-10-07 16:16:50 +02:00
relcache.h Move RelFileNumber declarations to common/relpath.h. 2022-09-27 12:01:57 -04:00
relfilenumbermap.h Include common/relpath.h in utils/relfilenumbermap.h 2022-09-27 13:35:20 -04:00
relmapper.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
relptr.h Fix relptr's encoding of the base address. 2022-06-27 11:34:26 +12:00
reltrigger.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
resowner.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
resowner_private.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rls.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
ruleutils.h Add public ruleutils.c entry point to deparse a Query. 2022-03-28 11:19:37 -04:00
sampling.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
selfuncs.h Revert "Optimize order of GROUP BY keys". 2022-10-03 10:56:16 -04:00
sharedtuplestore.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
snapmgr.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
snapshot.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sortsupport.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
spccache.h Add missing 'extern' to function prototypes. 2022-05-12 12:39:33 -07:00
syscache.h Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
timeout.h pgstat: store statistics in shared memory. 2022-04-06 21:29:46 -07:00
timestamp.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
tuplesort.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
tuplestore.h Remove all traces of tuplestore_donestoring() in the C code 2022-02-17 09:52:02 +09:00
typcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
tzparser.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
uuid.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
varbit.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
varlena.h Adjust assorted hint messages that list all valid options. 2022-09-16 14:53:12 +02:00
wait_event.h Remove the restriction that the relmap must be 512 bytes. 2022-07-26 14:56:25 -04:00
xid8.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
xml.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00