Dean Rasheed <dean(dot)a(dot)rasheed(at)googlemail(dot)com> writes:
> Oops, my fault. The list returned by ExecInsertIndexTuples() needs to be
> freed otherwise lots of lists (one per row) will build up and not be freed
> until the end of the query. This actually accounts for even more memory
> than the after-trigger event queue. Patch attached.
It seems a bit unlikely that this would be the largest memory leak in
that area. Can you show a test case that demonstrates this is worth
worrying about?
regards, tom lane