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 1 Topic 9443 of 10966
Post > Topic >>

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

by simon@[EMAIL PROTECTED] (Simon Riggs) May 29, 2008 at 06:41 AM

On Wed, 2008-05-28 at 18:17 -0400, Gregory Stark wrote:
> "Simon Riggs" <simon@[EMAIL PROTECTED]
> writes:
> 
> > AFAICS we must aggregate the trigger checks. We would need a special
> > property of triggers that allowed them to be aggregated when two
similar
> > checks arrived. We can then use hash aggregation to ac***ulate them.
We
> > might conceivably need to spill to disk also, since the aggregation
may
> > not always be effective. But in most cases the tables against which FK
> > checks are made are significantly smaller than the tables being
loaded.
> > Once we have hash aggregated them, that is then the first part of a
hash
> > join to the target table.
> 
> Well we can't aggregate them as they're created because later
modifications
> could delete or update the original records. The SQL spec requires that
FK
> checks be effective at the end of the command. 

Well, thats what we need to do. We just need to find a way...

Currently, we store trigger entries by htid. I guess we need to
aggregate them on the actual values looked up.

The SQL spec also says that the contents of the FK check table should be
taken as at the start of the command, so we should be safe to aggregate
the values prior to the check.

As already suggested in work on Read Only Tables, we could optimise them
away to being constraint checks.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Sup****t


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




 1 Posts in Topic:
Re: BUG #4204: COPY to table with FK has memory leak
simon@[EMAIL PROTECTED]   2008-05-29 06:41:44 

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 13:48:02 CST 2008.