Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > Re: BUG #4204: ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 9435 of 10965
Post > Topic >>

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

by stark@[EMAIL PROTECTED] (Gregory Stark) May 28, 2008 at 02:22 PM

[moving to -hackers]

"Tom Lane" <tgl@[EMAIL PROTECTED]
> writes:

> "Tomasz Rybak" <bogomips@[EMAIL PROTECTED]
> writes:
>> I tried to use COPY to im****t 27M rows to table:
>> CREATE TABLE sputnik.ccc24 (
>>         station CHARACTER(4) NOT NULL REFERENCES sputnik.station24
(id),
>>         moment INTEGER NOT NULL,
>>         flags INTEGER NOT NULL
>> ) INHERITS (sputnik.sputnik);
>> COPY sputnik.ccc24(id, moment, station, strength, sequence, flags)
>> FROM '/tmp/24c3' WITH DELIMITER AS ' ';
>
> This is expected to take lots of memory because each row-requiring-check
> generates an entry in the pending trigger event list.  Even if you had
> not exhausted memory, the actual execution of the retail checks would
> have taken an unreasonable amount of time.  The recommended way to do
> this sort of thing is to add the REFERENCES constraint *after* you load
> all the data; that'll be a lot faster in most cases because the checks
> are done "in bulk" using a JOIN rather than one-at-a-time.

Hm, it occurs to me that we could still do a join against the pending
event
trigger list... I wonder how feasible it would be to store the pending
trigger
event list in a tem****ary table instead of in ram.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's On-Demand Production Tuning

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 2 Posts in Topic:
Re: BUG #4204: COPY to table with FK has memory leak
stark@[EMAIL PROTECTED]   2008-05-28 14:22:36 
Re: BUG #4204: COPY to table with FK has memory leak
tgl@[EMAIL PROTECTED] (T  2008-05-28 16:28:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 9:11:55 CST 2008.