Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
db3ac67d
Commit
db3ac67d
authored
24 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Update comments about memory management.
parent
5c2abb96
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/executor/nodeAgg.c
+13
-1
13 additions, 1 deletion
src/backend/executor/nodeAgg.c
with
13 additions
and
1 deletion
src/backend/executor/nodeAgg.c
+
13
−
1
View file @
db3ac67d
...
...
@@ -29,12 +29,24 @@
* of course). A non-strict finalfunc can make its own choice of
* what to return for a NULL ending transvalue.
*
* When the transvalue datatype is pass-by-reference, we have to be
* careful to ensure that the values survive across tuple cycles yet
* are not allowed to accumulate until end of query. We do this by
* "ping-ponging" between two memory contexts; successive calls to the
* transfunc are executed in alternate contexts, passing the previous
* transvalue that is in the other context. At the beginning of each
* tuple cycle we can reset the current output context to avoid memory
* usage growth. Note: we must use MemoryContextContains() to check
* whether the transfunc has perhaps handed us back one of its input
* values rather than a freshly palloc'd value; if so, we copy the value
* to the context we want it in.
*
*
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.7
3
2001/0
1/24 19:42:54 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.7
4
2001/0
2/15 21:47:08 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment