Re: problems with table corruption continued - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: problems with table corruption continued
Date
Msg-id 3C200FF8.6D344DC@tpf.co.jp
Whole thread Raw
In response to Re: problems with table corruption continued  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: problems with table corruption continued  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
Stephan Szabo wrote:
> 
> On Tue, 18 Dec 2001, Tom Lane wrote:
> 
> > The ri_triggers code has a lot of places that open things NoLock,
> > but it only looks into the relcache entry and doesn't try to scan
> > the relation.  Nonetheless that code bothers me; we could be using
> > an obsolete relcache entry if someone has just committed an ALTER
> > TABLE on the relation.  Some of the cases may be safe because a lock
> > is held higher up (eg, on the table from which the trigger was fired)
> > but I doubt they all are.
> 
> Probably not, since it looks like that's being done for the other table of
> the constraint (not the one on which the trigger was fired).

If a lock is held already, acquiring an AccessShareLock
would cause no addtional conflict. I don't see any reason
to walk a tightrope with NoLock intentionally.

regards,
Hiroshi Inoue


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: checkpoint reliability
Next
From: Bruce Momjian
Date:
Subject: Re: checkpoint reliability