aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/auth.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 17:00:32 -0400
commit55d9cd46f65a5fc0c3bbb69d36cc9dba597a8c9c (patch)
tree7c79606984cfcc760d3e69af32b7f0c6363b2cdf /src/backend/libpq/auth.c
parentf5580882856963d1b50f9e391a8dda82d44b69a6 (diff)
downloadpostgresql-55d9cd46f65a5fc0c3bbb69d36cc9dba597a8c9c.tar.gz
postgresql-55d9cd46f65a5fc0c3bbb69d36cc9dba597a8c9c.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/backend/libpq/auth.c')
0 files changed, 0 insertions, 0 deletions