Re: RI_FKey_check: foreign key constraint blocks parallel - Mailing list pgsql-hackers

From Manfred Koizar
Subject Re: RI_FKey_check: foreign key constraint blocks parallel
Date
Msg-id t6oatuc4tubo6j6tg9cefg1q3r4dtq50m1@4ax.com
Whole thread Raw
In response to Re: RI_FKey_check: foreign key constraint blocks parallel  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: RI_FKey_check: foreign key constraint blocks parallel  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
On Wed, 13 Nov 2002 14:22:51 -0800 (PST), Stephan Szabo
<sszabo@megazone23.bigpanda.com> wrote:
>Right now, I know that it has a hole that lets through invalid data

Stephan, your patch has been posted to -general (Subject: Re:
[GENERAL] Help..Help...).  Is this version still valid?

> void
> heap_mark4fk_lock_acquire(Relation relation, HeapTuple tuple) {
>  [...]
>  /* try to find the list for the table in question */
This part of the patch works, if the list
(a) is initially empty or
(b) already contains relid or
(c) starts with a table > relid.

>  while (ptr!=NULL) {
>   if (relid>ptr->table) {
>    ptr=ptr->next;
>    oldptr=ptr;
// AFAICT above two lines should be swapped ...
>   }
>   else 
>    break;
>  }

... otherwise
(d) if the new relid is to be inserted between two existing entries,
we get two items pointing to each other
(e) if the new relid is > the last table in the list, we lose the
whole list.

ServusManfred


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: Time to move on...
Next
From: Tom Lane
Date:
Subject: char(n) to varchar or text conversion should strip trailing spaces