diff options
author | Joe Conway <mail@joeconway.com> | 2012-05-09 22:57:19 -0700 |
---|---|---|
committer | Joe Conway <mail@joeconway.com> | 2012-05-09 22:57:19 -0700 |
commit | b58bacdacbb15948cf24c786ebbb92213a2fe013 (patch) | |
tree | 054782dedee44dcef2319377c12c59ac13e9d562 | |
parent | fd71421b0187de0e2bf76ff66b4a9433bd96c4a0 (diff) | |
download | postgresql-b58bacdacbb15948cf24c786ebbb92213a2fe013.tar.gz postgresql-b58bacdacbb15948cf24c786ebbb92213a2fe013.zip |
PL/pgSQL RETURN NEXT was leaking converted tuples, causing
out of memory when looping through large numbers of rows.
Flag the converted tuples to be freed. Complaint and patch
by Joe.
-rw-r--r-- | src/pl/plpgsql/src/pl_exec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index a385b9a82a2..95e74b38dc4 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -2472,6 +2472,7 @@ exec_stmt_return_next(PLpgSQL_execstate *estate, { tuple = do_convert_tuple(tuple, tupmap); free_conversion_map(tupmap); + free_tuple = true; } } break; |