Fix oversized memory allocation in Parallel Hash Join
authorAlexander Korotkov <akorotkov@postgresql.org>
Sun, 7 Jan 2024 07:03:55 +0000 (09:03 +0200)
committerAlexander Korotkov <akorotkov@postgresql.org>
Sun, 7 Jan 2024 07:10:49 +0000 (09:10 +0200)
commit3bdaa8fc622f51ab2836314a9f087b6af81eef06
tree1571305425ca53cd91f0cc7ab34113491a185dbb
parent727cf6f6d31cf5a8cbe144207f22d0b76583f4d0
Fix oversized memory allocation in Parallel Hash Join

During the calculations of the maximum for the number of buckets, take into
account that later we round that to the next power of 2.

Reported-by: Karen Talarico
Bug: #16925
Discussion: https://postgr.es/m/16925-ec96d83529d0d629%40postgresql.org
Author: Thomas Munro, Andrei Lepikhov, Alexander Korotkov
Reviewed-by: Alena Rybakina
Backpatch-through: 12
src/backend/executor/nodeHash.c