Re: Re: [COMMITTERS] pgsql/src/backend/utils/adt (ri_triggers.c) - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: Re: [COMMITTERS] pgsql/src/backend/utils/adt (ri_triggers.c)
Date
Msg-id 3A1A4650.DFE9B07B@tpf.co.jp
Whole thread Raw
In response to Re: [COMMITTERS] pgsql/src/backend/utils/adt (ri_triggers.c)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: RE: Table/Column Constraints
Next
From: "Vadim Mikheev"
Date:
Subject: Re: Re: [COMMITTERS] pgsql/src/backend/access/transam (xlog.c)