8000 PL/pgSQL RETURN NEXT was leaking converted tuples, causing · jcsston/postgres@5a96a0a · GitHub
[go: up one dir, main page]

Skip to content

Commit 5a96a0a

Browse files
committed
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.
1 parent d02918f commit 5a96a0a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/pl/plpgsql/src/pl_exec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,6 +2243,7 @@ exec_stmt_return_next(PLpgSQL_execstate *estate,
22432243
{
22442244
tuple = do_convert_tuple(tuple, tupmap);
22452245
free_conversion_map(tupmap);
2246+
free_tuple = true;
22462247
}
22472248
}
22482249
break;

0 commit comments

Comments
 (0)
0