pgsql: Fix hashjoin memory balancing logic

2025-10-17 Thread Tomas Vondra
Fix hashjoin memory balancing logic Commit a1b4f289beec improved the hashjoin sizing to also consider the memory used by BufFiles for batches. The code however had multiple issues, making it ineffective or not working as expected in some cases. * The amount of memory needed by buffers was calcula

pgsql: Fix hashjoin memory balancing logic

2025-10-17 Thread Tomas Vondra
Fix hashjoin memory balancing logic Commit a1b4f289beec improved the hashjoin sizing to also consider the memory used by BufFiles for batches. The code however had multiple issues, making it ineffective or not working as expected in some cases. * The amount of memory needed by buffers was calcula