pgsql: Use context with correct lifetime in hypothetical_dense_rank_fin

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use context with correct lifetime in hypothetical_dense_rank_fin
Date: 2018-07-05 00:39:50
Message-ID: E1fasJK-0006YS-6g@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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-

Branch
------
REL_11_STABLE

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

Modified Files
--------------
src/backend/utils/adt/orderedsetaggs.c | 10 +++++++++-
src/test/regress/expected/aggregates.out | 9 +++++++++
src/test/regress/sql/aggregates.sql | 3 +++
3 files changed, 21 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2018-07-05 01:49:21 pgsql: Prevent references to invalid relation pages after fresh promoti
Previous Message Andres Freund 2018-07-05 00:39:48 pgsql: Use context with correct lifetime in hypothetical_dense_rank_fin