projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d02918f
)
PL/pgSQL RETURN NEXT was leaking converted tuples, causing
author
Joe Conway
<mail@joeconway.com>
Thu, 10 May 2012 05:51:17 +0000
(22:51 -0700)
committer
Joe Conway
<mail@joeconway.com>
Thu, 10 May 2012 05:51:17 +0000
(22:51 -0700)
out of memory when looping through large numbers of rows.
Flag the converted tuples to be freed. Complaint and patch
by Joe.
src/pl/plpgsql/src/pl_exec.c
patch
|
blob
|
blame
|
history
diff --git
a/src/pl/plpgsql/src/pl_exec.c
b/src/pl/plpgsql/src/pl_exec.c
index 2f8468336f8603cd20ee4137bf15f61327b143d9..0e77284d480528a5c1a3bf05b15bee1908dd8953 100644
(file)
--- a/
src/pl/plpgsql/src/pl_exec.c
+++ b/
src/pl/plpgsql/src/pl_exec.c
@@
-2243,6
+2243,7
@@
exec_stmt_return_next(PLpgSQL_execstate *estate,
{
tuple = do_convert_tuple(tuple, tupmap);
free_conversion_map(tupmap);
+ free_tuple = true;
}
}
break;