diff options
| author | Joe Conway <mail@joeconway.com> | 2012-05-09 22:51:17 -0700 |
|---|---|---|
| committer | Joe Conway <mail@joeconway.com> | 2012-05-09 22:51:17 -0700 |
| commit | 5a96a0a8cf8cea3c5737fec9d37a75f012302f60 (patch) | |
| tree | 5e83c5bbd4c45c794923c01e24d9db2d79abe69c | |
| parent | d02918fc3e67104348dd7ba67b17df6836201ac0 (diff) | |
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 2f8468336f8..0e77284d480 100644 --- 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; |
