  Date: Monday, November 20, 2000 @ 23:01:10
Author: inoue

Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/adt
     from hub.org:/tmp/cvs-serv1659/utils/adt

Modified Files:
	ri_triggers.c 

-----------------------------  Log Message  -----------------------------

keep relations open until they are no longer needed.


Mon, 20 Nov 2000 23:01:10 -0500 (EST)
inoue@postgresql.org
pgsql/src/backend/utils/adt (ri_triggers.c)
inoue@postgresql.org writes:
> Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/adt
> Modified Files:
> 	ri_triggers.c 
> keep relations open until they are no longer needed.

Something that's been bothering me for a good while about ri_triggers
is that it opens the relations without any lock to begin with.
That can't possibly be safe, can it?

			regards, tom lane

Mon, 20 Nov 2000 23:37:52 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: [COMMITTERS] pgsql/src/backend/utils/adt (ri_triggers.c) 
At 11:37 PM 11/20/00 -0500, Tom Lane wrote:
>inoue@postgresql.org writes:
>> Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/adt
>> Modified Files:
>> 	ri_triggers.c 
>> keep relations open until they are no longer needed.
>
>Something that's been bothering me for a good while about ri_triggers
>is that it opens the relations without any lock to begin with.
>That can't possibly be safe, can it?

Hmmm...I only worked within the structure Jan built (to fix/implement
semantics) but there are efforts to lock things down with "select for
update" where Jan felt it was necessary.  Whether or not that's sufficient
is another question, but he obviously gave it *some* thought.



- Don Baccus, Portland OR <dhogaza@pacifier.com>
  Nature photos, on-line guides, Pacific Northwest
  Rare Bird Alert Service and other goodies at
  http://donb.photo.net.

Mon, 20 Nov 2000 21:09:26 -0800
Don Baccus <dhogaza@pacifier.com>
Re: Re: [COMMITTERS] pgsql/src/backend/utils/adt
  (ri_triggers.c)
Tom Lane wrote:

> inoue@postgresql.org writes:
> > Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/adt
> > Modified Files:
> >       ri_triggers.c
> > keep relations open until they are no longer needed.
>
> Something that's been bothering me for a good while about ri_triggers
> is that it opens the relations without any lock to begin with.
> That can't possibly be safe, can it?

Opening relations with no lock seems illegal to me.
Though I have no evidence that it does wrong thing
in ri_triggers.c,it seems that we had better acquire
an AccessShareLock on trial.
I  sometimes see SEGV error around ri stuff and
I've doubted opening relations with no lock.
However the cause was different from it.

Hiroshi Inoue


Tue, 21 Nov 2000 18:54:24 +0900
Hiroshi Inoue <Inoue@tpf.co.jp>
Re: Re: [COMMITTERS] pgsql/src/backend/utils/adt
 (ri_triggers.c)