From: | Alexander Korotkov <akorotkov(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix division by zero in _bt_vacuum_needs_cleanup() |
Date: | 2019-04-15 18:57:03 |
Message-ID: | E1hG6mt-0006X3-Pg@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0d68ad3fc28377d36a3e1dd8b0e2ff47e693e552
Modified Files
--------------
src/backend/access/nbtree/nbtree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2019-04-15 18:57:55 | Re: pgsql: Increase upper limit for vacuum_cleanup_index_scale_factor |
Previous Message | Alexander Korotkov | 2019-04-15 18:56:58 | pgsql: Fix division by zero in _bt_vacuum_needs_cleanup() |