model-writtenrun 5296 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Zhang Mingli reported a hash-join crash first encountered in Greenplum and reproduced in PostgreSQL with a very wide table and low memory settings; integer division could pass zero to pg_nextpower2_size_t() in ExecChooseHashTableSize() #1.
- Zhang Mingli proposed setting the bucket count to one when a bucket exceeds the memory allowance, preferring continued operation over an error asking users to increase memory, and attached the fix with a regression test #1.
- Tom Lane committed the fix from #1 with an equivalent boundary comparison and an explanatory comment, omitting the regression test without a stated reason 55d9cd46f6.
- The commit attributed the bug to an earlier conversion of logarithm-based sizing code and called for backpatching through PostgreSQL 13 55d9cd46f6.
- Tom Lane closed the thread by confirming that the fix had been pushed and thanking the author, with no further work raised #3.