Use context with correct lifetime in hypothetical_dense_rank_final.
Andres Freund <andres@anarazel.de>
Use context with correct lifetime in hypothetical_dense_rank_final. The query lifetime expression context created in hypothetical_dense_rank_final() was buggily allocated in the calling memory context. I (Andres) broke that in bf6c614a2f2. Reported-By: Rajkumar Raghuwanshi Author: Amit Langote Discussion: https://postgr.es/m/CAKcux6kmzWmur5HhA_aU6gYVFu0RLQdgJJ+aC9SLdcOvBSrpfA@mail.gmail.com Backpatch: 11-
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/orderedsetaggs.c | modified | +9 −1 |
| src/test/regress/expected/aggregates.out | modified | +9 −0 |
| src/test/regress/sql/aggregates.sql | modified | +3 −0 |
Discussion
- Server crashed with dense_rank on partition table. 8 messages · 2018-06-13 → 2018-07-05