pgsql: Fix partial aggregation for variance(int4) and related aggregate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix partial aggregation for variance(int4) and related aggregate
Date: 2018-06-21 20:18:58
Message-ID: E1fW62k-00043C-Sk@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix partial aggregation for variance(int4) and related aggregates.

A typo in numeric_poly_combine caused bogus results for queries using
it, but of course would only manifest if parallel aggregation is
performed. Reported by Rajkumar Raghuwanshi.

David Rowley did the diagnosis and the fix; I editorialized rather
heavily on his regression test additions.

Back-patch to v10 where the breakage was introduced (by 9cca11c91).

Discussion: https://postgr.es/m/CAKcux6nU4E2x8nkSBpLOT2DPvQ5LviJ3SGyAN6Sz7qDH4G4+Pw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ec4719cd155d1d58c8aa7c06c7ef24aef6e67622

Modified Files
--------------
src/backend/utils/adt/numeric.c | 4 ++--
src/test/regress/expected/aggregates.out | 27 +++++++++++++++++++++++++++
src/test/regress/sql/aggregates.sql | 18 ++++++++++++++++++
3 files changed, 47 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2018-06-21 21:01:56 pgsql: Disclaim support for default namespace in XMLTABLE
Previous Message Alvaro Herrera 2018-06-21 19:58:12 pgsql: Set correct context for XPath evaluation