pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix partial aggregation for variance(int4) and related aggregate
Date: Thu, 21 Jun 2018 20:18:58 +0000
Message-ID: <E1fW62k-00043D-Sr@gemulon.postgresql.org> (raw)

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
------
REL_10_STABLE

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

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1fW62k-00043D-Sr@gemulon.postgresql.org>
Permalink:  ../E1fW62k-00043D-Sr@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fW62k-00043D-Sr@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix partial aggregation for variance(int4) and related aggregate
  In-Reply-To: <E1fW62k-00043D-Sr@gemulon.postgresql.org>
  References: <E1fW62k-00043D-Sr@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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