diff options
| author | Heikki Linnakangas | 2016-12-20 07:20:17 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2016-12-20 07:20:17 +0000 |
| commit | db80acfc9d50ac56811d22802ab3d822ab313055 (patch) | |
| tree | d4ef4a9e278ea7a841668342b2e0c9dc5a900c04 /src/backend/utils/cache/syscache.c | |
| parent | 7cd0fd655d681e0ed5f7269fa421d977f1df0889 (diff) | |
Fix sharing Agg transition state of DISTINCT or ordered aggs.
If a query contained two aggregates that could share the transition value,
we would correctly collect the input into a tuplesort only once, but
incorrectly run the transition function over the accumulated input twice,
in finalize_aggregates(). That caused a crash, when we tried to call
tuplesort_performsort() on an already-freed NULL tuplestore.
Backport to 9.6, where sharing of transition state and this bug were
introduced.
Analysis by Tom Lane.
Discussion: https://www.postgresql.org/message-id/[email protected]
Diffstat (limited to 'src/backend/utils/cache/syscache.c')
0 files changed, 0 insertions, 0 deletions
