From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Michael Fuhr <mike(at)fuhr(dot)org>, Bruno Wolff III <bruno(at)wolff(dot)to>, Martin Lesser <ml-pgsql(at)bettercom(dot)de>, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Effects of cascading references in foreign keys |
Date: | 2005-12-07 04:41:16 |
Message-ID: | 200512070441.jB74fGY21078@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Would someone add a comment in the code about this, or research it?
---------------------------------------------------------------------------
Tom Lane wrote:
> I wrote:
> > Looking at this, I wonder if there isn't a bug or at least an
> > inefficiency in 8.1. The KeysEqual short circuit tests are still there
> > in ri_triggers.c; aren't they now redundant with the test in triggers.c?
> > And don't they need to account for the special case mentioned in the
> > comment in triggers.c, that the RI check must still be done if we are
> > looking at a row updated by the same transaction that created it?
>
> OK, I take back the possible-bug comment: the special case only applies
> to the FK-side triggers, which is to say RI_FKey_check, and that routine
> doesn't attempt to skip the check on equal old/new keys. I'm still
> wondering though if the KeysEqual tests in the other RI triggers aren't
> now a waste of cycles.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-12-07 04:49:28 | Re: High context switches occurring |
Previous Message | Bruce Momjian | 2005-12-07 04:34:04 | Re: High context switches occurring |