pgsql: Avoid integer overflow in the loop that extracts histogram

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid integer overflow in the loop that extracts histogram
Date: 2009-05-05 18:02:11
Message-ID: 20090505180211.B2A59754069@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Avoid integer overflow in the loop that extracts histogram entries from
ANALYZE's total sample. The original coding is at risk of overflow for
statistics targets exceeding about 2675; this was not a problem before
8.4 but it is now. Per bug #4793 from Dennis Noordsij.

Modified Files:
--------------
pgsql/src/backend/commands:
analyze.c (r1.135 -> r1.136)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/analyze.c?r1=1.135&r2=1.136)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2009-05-05 18:32:18 pgsql: Disable the use of Unicode escapes in string constants (U&'')
Previous Message User Bmomjian 2009-05-05 17:44:05 pg-migrator - pg_migrator: Fix compiler warning.