1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-29 15:58:33 +03:00

Fix broken indentation caused by 34d52e6d3

Per buildfarm member koel

Backpatch to 19 to avoid unnecessary variations.

Backpatch-through: 19
This commit is contained in:
David Rowley
2026-10-28 11:42:58 +13:00
parent 6add85f412
commit 6bd4b59a9f

View File

@@ -206,16 +206,16 @@ BuildTupleHashTable(PlanState *parent,
* clamp the given nelements to fit in that. We'd also better do
* something sane when faced with a zero or NaN estimate. There are
* various reasons why the planner might not be able to provide a good
* estimate here; for example, recursive CTEs don't base their estimate
* on anything reliable and can yield some rather large estimates. Here
* we cap nbuckets to hash_mem to help prevent insane memory allocations.
* The hash table can still grow when the bucket count is insufficient.
* That will make the query a little slower, but that's better than
* outright failing due to OOM if we were to request an insane bucket
* count. Queries being slightly slower with smaller work_mem values is
* also aligned to user expectations. We purposefully don't include the
* tuple width in this calculation, as that would make the cap depend on
* planner estimates for the tuple width, which could also be unreliable.
* estimate here; for example, recursive CTEs don't base their estimate on
* anything reliable and can yield some rather large estimates. Here we
* cap nbuckets to hash_mem to help prevent insane memory allocations. The
* hash table can still grow when the bucket count is insufficient. That
* will make the query a little slower, but that's better than outright
* failing due to OOM if we were to request an insane bucket count.
* Queries being slightly slower with smaller work_mem values is also
* aligned to user expectations. We purposefully don't include the tuple
* width in this calculation, as that would make the cap depend on planner
* estimates for the tuple width, which could also be unreliable.
*/
if (isnan(nelements) || nelements <= 0)
nbuckets = 1;