Re: [PATCHES] Deferred RI trigger for non-key UPDATEs and subxacts

2007-07-17 Thread Tom Lane
Stephan Szabo [EMAIL PROTECTED] writes: On Sun, 15 Jul 2007, Tom Lane wrote: I don't think this is right. If the original tuple was inserted by a subtransaction of our transaction, it will have been checked at subtransaction subcommit, no? I don't think the subtransaction subcommit will do

Re: [PATCHES] Deferred RI trigger for non-key UPDATEs and subxacts

2007-07-17 Thread Affan Salman
OK, that's what I get for opining before checking the code ;-). Your *cerebral call graph visits* have a knack of being spot on, way more than often. :-) Will apply. Thanks, Tom. We're also back-patching this, right? -- Affan Salman EnterpriseDB Corporation

Re: [PATCHES] Deferred RI trigger for non-key UPDATEs and subxacts

2007-07-17 Thread Tom Lane
Affan Salman [EMAIL PROTECTED] writes: Thanks, Tom. We're also back-patching this, right? Yeah, working on that now. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [PATCHES] Deferred RI trigger for non-key UPDATEs and subxacts

2007-07-16 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Affan Salman [EMAIL PROTECTED] writes: With some time to spare, I thought I'd submit a quick-fix patch to the issue I reported here: http://archives.postgresql.org/pgsql-hackers/2007-07/msg00339.php I don't think this is right. If the original

Re: [PATCHES] Deferred RI trigger for non-key UPDATEs and subxacts

2007-07-16 Thread Stephan Szabo
On Sun, 15 Jul 2007, Tom Lane wrote: Affan Salman [EMAIL PROTECTED] writes: With some time to spare, I thought I'd submit a quick-fix patch to the issue I reported here: http://archives.postgresql.org/pgsql-hackers/2007-07/msg00339.php I don't think this is right. If the original

Re: [PATCHES] Deferred RI trigger for non-key UPDATEs and subxacts

2007-07-16 Thread Affan Salman
Tom Lane wrote: I don't think this is right. If the original tuple was inserted by a subtransaction of our transaction, it will have been checked at subtransaction subcommit, no? No, it will be checked at main transaction commit; the immediate_only flag is FALSE for

Re: [PATCHES] Deferred RI trigger for non-key UPDATEs and subxacts

2007-07-16 Thread Gregory Stark
Gregory Stark [EMAIL PROTECTED] writes: On the other hand what happens if you have constraints not deferred, insert a record, then set constraints deferred and update it? After having a coffee this is obviously not a problem since if you have constraints not deferred then the constraint was

Re: [PATCHES] Deferred RI trigger for non-key UPDATEs and subxacts

2007-07-15 Thread Simon Riggs
On Sat, 2007-07-14 at 00:12 +0100, Affan Salman wrote: With some time to spare, I thought I'd submit a quick-fix patch to the issue I reported here: http://archives.postgresql.org/pgsql-hackers/2007-07/msg00339.php This should preclude optimizing away a deferred RI trigger if the

Re: [PATCHES] Deferred RI trigger for non-key UPDATEs and subxacts

2007-07-15 Thread Tom Lane
Affan Salman [EMAIL PROTECTED] writes: With some time to spare, I thought I'd submit a quick-fix patch to the issue I reported here: http://archives.postgresql.org/pgsql-hackers/2007-07/msg00339.php I don't think this is right. If the original tuple was inserted by a subtransaction of