Re: BUG #4204: COPY to table with FK has memory leak

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: BUG #4204: COPY to table with FK has memory leak
Date: 2008-05-28 22:42:06
Message-ID: 10598.1212014526@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
>> We certainly need a TODO item for "improve RI checks during bulk
>> operations".

> I have a feeling it's already there. Hm. There's a whole section on RI
> triggers but the closest I see is this, neither of the links appear to refer
> to bulk operations:

> Optimize referential integrity checks
> http://archives.postgresql.org/pgsql-performance/2005-10/msg00458.php
> http://archives.postgresql.org/pgsql-hackers/2007-04/msg00744.php

No, both of those are talking about the same thing, ie, (1) making the
are-the-keys-unchanged optimization work when NULLs are present,
and (2) not testing for this case twice.

There's an entry in the Triggers section

* Add deferred trigger queue file

Right now all deferred trigger information is stored in backend
memory. This could exhaust memory for very large trigger queues.
This item involves dumping large queues into files.

but as already noted, this is a pretty myopic answer (at least for
RI triggers).

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-05-28 23:20:26 Re: BUG #4186: set lc_messages does not work
Previous Message Gregory Stark 2008-05-28 22:17:23 Re: BUG #4204: COPY to table with FK has memory leak

Browse pgsql-hackers by date

  From Date Subject
Next Message Sabbiolina 2008-05-28 23:05:22 [PERFORM] Memory question on win32 systems
Previous Message Gregory Stark 2008-05-28 22:17:23 Re: BUG #4204: COPY to table with FK has memory leak