aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-secure-openssl.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-08-13 16:59:58 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-08-13 16:59:58 -0400
commitaee95437362db0ef2c4caed942272c86b4509390 (patch)
tree986f34da205213f230acfc1501c81e121748d26f /src/interfaces/libpq/fe-secure-openssl.c
parent00ac61695e5c7d573b14bb7a61387a3fae017928 (diff)
downloadpostgresql-aee95437362db0ef2c4caed942272c86b4509390.tar.gz
postgresql-aee95437362db0ef2c4caed942272c86b4509390.zip
Avoid misbehavior when hash_table_bytes < bucket_size.
It's possible to reach this case when work_mem is very small and tupsize is (relatively) very large. In that case ExecChooseHashTableSize would get 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 in 28d936031. Back-patch to v13, as that was. Zhang Mingli Discussion: https://postgr.es/m/beb64ca0-91e2-44ac-bf4a-7ea36275ec02@Spark
Diffstat (limited to 'src/interfaces/libpq/fe-secure-openssl.c')
0 files changed, 0 insertions, 0 deletions