Skip site navigation (1) Skip section navigation (2)

Memory leak in deferrable index constraints

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)googlemail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Memory leak in deferrable index constraints
Date: 2010-01-31 14:45:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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.

Of course the after-trigger queue still uses a lot of memory for large
updates (I was working on a patch for that but ran out of time before
this commitfest started). This fix at least brings deferred index
constraints into line with FK constraints, in terms of memory usage.


Attachment: memory_leak.patch
Description: application/octet-stream (1.2 KB)


pgsql-hackers by date

Next:From: Tom LaneDate: 2010-01-31 16:03:01
Subject: Re: Memory leak in deferrable index constraints
Previous:From: Matteo BeccatiDate: 2010-01-31 14:09:17
Subject: Re: mailing list archiver chewing patches

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group