diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2019-04-15 20:20:43 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2019-04-15 21:52:32 +0300 |
commit | 0d68ad3fc28377d36a3e1dd8b0e2ff47e693e552 (patch) | |
tree | 01f1e2feb7e82303f7585103b4e0222f267dfc3a /contrib/btree_gist/btree_gist.c | |
parent | 51290264346f0afce9752e5f6c957e1bfa3d2391 (diff) | |
download | postgresql-0d68ad3fc28377d36a3e1dd8b0e2ff47e693e552.tar.gz postgresql-0d68ad3fc28377d36a3e1dd8b0e2ff47e693e552.zip |
Fix division by zero in _bt_vacuum_needs_cleanup()
Checks inside _bt_vacuum_needs_cleanup() allow division by zero to happen when
metad->btm_last_cleanup_num_heap_tuples == 0. This commit adjusts the
expression so that no division by zero might happen.
Reported-by: Piotr Stefaniak
Discussion: https://postgr.es/m/DB8PR03MB5931C41F7787A95313F08322F22A0%40DB8PR03MB5931.eurprd03.prod.outlook.com
Reviewed-by: Masahiko Sawada
Backpatch-through: 11
Diffstat (limited to 'contrib/btree_gist/btree_gist.c')
0 files changed, 0 insertions, 0 deletions