Fix oversized memory allocation in Parallel Hash Join
authorAlexander Korotkov <[email protected]>
Sun, 7 Jan 2024 07:03:55 +0000 (09:03 +0200)
committerAlexander Korotkov <[email protected]>
Sun, 7 Jan 2024 07:18:43 +0000 (09:18 +0200)
commit72d5b27763a86c1d9af79e3169aef885b79373a3
tree099300b424a591f7b9c08e41ac126b22d5aa7976
parent49fa18390cfbd03956a4820910777c3d6585d5a7
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