pgsql: Fix some issues in new hashtable size calculations in nodeHash.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix some issues in new hashtable size calculations in nodeHash.c
Дата
Msg-id E1Zingi-0003Kz-29@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix some issues in new hashtable size calculations in nodeHash.c.

Limit the size of the hashtable pointer array to not more than
MaxAllocSize, per reports from Kouhei Kaigai and others of "invalid memory
alloc request size" failures.  There was discussion of allowing the array
to get larger than that by using the "huge" palloc API, but so far no proof
that that is actually a good idea, and at this point in the 9.5 cycle major
changes from old behavior don't seem like the way to go.

Fix a rather serious secondary bug in the new code, which was that it
didn't ensure nbuckets remained a power of 2 when recomputing it for the
multiple-batch case.

Clean up sloppy division of labor between ExecHashIncreaseNumBuckets and
its sole call site.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a31e64d0652622d4627ffa2123163a43538a3f51

Modified Files
--------------
src/backend/executor/nodeHash.c |   60 +++++++++++++++++++--------------------
src/include/executor/hashjoin.h |    2 +-
2 files changed, 31 insertions(+), 31 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix some issues in new hashtable size calculations in nodeHash.c
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix possible "invalid memory alloc request size" failure in node