pgsql: Make catalog cache hash tables resizeable.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Make catalog cache hash tables resizeable.
Дата
Msg-id E1VHdMj-0002ro-U5@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Make catalog cache hash tables resizeable.

If the hash table backing a catalog cache becomes too full (fillfactor > 2),
enlarge it. A new buckets array, double the size of the old, is allocated,
and all entries in the old hash are moved to the right bucket in the new
hash.

This has two benefits. First, cache lookups don't get so expensive when
there are lots of entries in a cache, like if you access hundreds of
thousands of tables. Second, we can make the (initial) sizes of the caches
much smaller, which saves memory.

This patch dials down the initial sizes of the catcaches. The new sizes are
chosen so that a backend that only runs a few basic queries still won't need
to enlarge any of them.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/20cb18db4668b016748fbb5fcb1422bc3e0d52d1

Modified Files
--------------
src/backend/utils/cache/catcache.c |   52 ++++++++++++++++--
src/backend/utils/cache/syscache.c |  104 ++++++++++++++++++------------------
src/include/utils/catcache.h       |    4 +-
3 files changed, 102 insertions(+), 58 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: pgsql: Improve Range Types and Exclusion Constraints example.
Следующее
От: Kevin Grittner
Дата:
Сообщение: pgsql: Eliminate pg_rewrite.ev_attr column and related dead code.