postgresql/src
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
..
backend Add auxiliary lists to GUC data structures for better performance. 2022-10-14 12:36:14 -04:00
bin meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
common meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
fe_utils meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
include Add auxiliary lists to GUC data structures for better performance. 2022-10-14 12:36:14 -04:00
interfaces Remove unnecessary uses of Abs() 2022-10-07 13:29:33 +02:00
makefiles autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
pl Store GUC data in a memory context, instead of using malloc(). 2022-10-14 12:10:48 -04:00
port meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
template Move darwin sysroot determination into separate file 2022-09-01 16:54:19 -07:00
test Put tests of md5() function into separate test file 2022-10-13 12:02:31 +02:00
timezone meson: Add windows resource files 2022-10-05 09:56:05 -07:00
tools Add meson.build to version_stamp.pl 2022-10-12 07:06:10 +02:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00