diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-05-29 22:22:43 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-05-29 22:27:42 +0300 |
commit | 4bc6fb57f774ea18187fd8565aad9994160bfc17 (patch) | |
tree | 7559f20bd7f1e97efe8b6d9a329a2ccf81b79cc0 /src/backend/access/gist/gistbuildbuffers.c | |
parent | 2755abf386e6572bad15cb6a032e504ad32308cc (diff) | |
download | postgresql-4bc6fb57f774ea18187fd8565aad9994160bfc17.tar.gz postgresql-4bc6fb57f774ea18187fd8565aad9994160bfc17.zip |
Fix integer overflow bug in GiST buffering build calculations.
The result of (maintenance_work_mem * 1024) / BLCKSZ doesn't fit in a signed
32-bit integer, if maintenance_work_mem >= 2GB. Use double instead. And
while we're at it, write the calculations in an easier to understand form,
with the intermediary steps written out and commented.
Diffstat (limited to 'src/backend/access/gist/gistbuildbuffers.c')
0 files changed, 0 insertions, 0 deletions