pgsql: Don't cache per-group context across the whole query in ordereds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't cache per-group context across the whole query in ordereds
Date: 2014-07-03 22:47:28
Message-ID: E1X2pmq-0002V4-Hs@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't cache per-group context across the whole query in orderedsetaggs.c.

Although nodeAgg.c currently uses the same per-group memory context for
all groups of a query, that might change in future. Avoid assuming it.
This costs us an extra AggCheckCallContext() call per group, but that's
pretty cheap and is probably good from a safety standpoint anyway.

Back-patch to 9.4 in case any third-party code copies this logic.

Andrew Gierth

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ecd657974478fc713fdc3a625d648cd6a985e3e6

Modified Files
--------------
src/backend/utils/adt/orderedsetaggs.c | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2014-07-04 02:42:13 pgsql: Split out the description of page-level lock as new subsection i
Previous Message Tom Lane 2014-07-03 22:26:15 pgsql: Redesign API presented by nodeAgg.c for ordered-set and similar