Re: [HACKERS] Foreign key bugs (Re: "New" bug?? Serious - crashes backend.)

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: Jan Wieck <JanWieck(at)Yahoo(dot)com>, ryan <ryan(at)bel(dot)bc(dot)ca>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Foreign key bugs (Re: "New" bug?? Serious - crashes backend.)
Date: 2000-07-11 15:34:35
Message-ID: 200007111534.LAA05463@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

> JanWieck(at)t-online(dot)de (Jan Wieck) writes:
> > Tom Lane wrote:
> >> There are at least two bugs here: the immediate cause of the crash
> >> is lack of a check for heap_openr() failure in the RI trigger code,
>
> > Exactly where is that check missing (if it still is)?
>
> The heap_openr calls with NoLock --- the way heap_open[r] are set up
> is that there's an elog on open failure iff you request a lock, but
> if you don't then you have to check for a NULL return explicitly.
> Perhaps this coding convention is too error-prone and ought to be
> changed to have two different routine names, say "heap_open[r]"
> and "heap_open[r]_noerr". Opinions anyone?

We already have heap_open and heap_openr. Seems another is too hard.
Better to give them a parameter to control it. The API is confusing enough.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-07-11 16:03:25 Re: [HACKERS] Foreign key bugs (Re: "New" bug?? Serious - crashes backend.)
Previous Message Tom Lane 2000-07-11 15:26:36 Re: [HACKERS] Foreign key bugs (Re: "New" bug?? Serious - crashes backend.)

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-07-11 15:39:12 Re: update on TOAST status'
Previous Message Tom Lane 2000-07-11 15:26:36 Re: [HACKERS] Foreign key bugs (Re: "New" bug?? Serious - crashes backend.)