forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4878ea7
committed
Avoid misbehavior when hash_table_bytes < bucket_size.
It's possible to reach this case when work_mem is very small and tupsizeis (relatively) very large. In that case ExecChooseHashTableSize wouldget an assertion failure, or with asserts off it'd compute nbuckets = 0,which'd likely cause misbehavior later (I've not checked). To fix,clamp the number of buckets to be at least 1.This is due to faulty conversion of old my_log2() coding in28d9360.Back-patch to v13, as that was.Zhang MingliDiscussion:https://postgr.es/m/beb64ca0-91e2-44ac-bf4a-7ea36275ec02@Spark1 parent60f8763 commit4878ea7
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
832 | 832 |
| |
833 | 833 |
| |
834 | 834 |
| |
835 |
| - | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
836 | 839 |
| |
837 | 840 |
| |
838 | 841 |
| |
|
0 commit comments
Comments
(0)