Re: BUG #4204: COPY to table with FK has memory leak - Mailing list pgsql-hackers

From Tom Lane
Subject Re: BUG #4204: COPY to table with FK has memory leak
Date
Msg-id 10598.1212014526@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4204: COPY to table with FK has memory leak  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> "Simon Riggs" <simon@2ndquadrant.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
triggerqueues. 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


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: BUG #4204: COPY to table with FK has memory leak
Next
From: Sabbiolina
Date:
Subject: [PERFORM] Memory question on win32 systems