pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix division by zero in _bt_vacuum_needs_cleanup() 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix division by zero in _bt_vacuum_needs_cleanup() @ 2019-04-15 18:56 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Alexander Korotkov @ 2019-04-15 18:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1e871981823a68ec9e0174b652e8d27e05ce08bb Modified Files -------------- src/backend/access/nbtree/nbtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix division by zero in _bt_vacuum_needs_cleanup() @ 2019-04-15 18:57 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Alexander Korotkov @ 2019-04-15 18:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-04-15 18:57 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-04-15 18:56 pgsql: Fix division by zero in _bt_vacuum_needs_cleanup() Alexander Korotkov <akorotkov@postgresql.org> 2019-04-15 18:57 pgsql: Fix division by zero in _bt_vacuum_needs_cleanup() Alexander Korotkov <akorotkov@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox