Re: failed runcheck

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: prlw1(at)cam(dot)ac(dot)uk, pgsql-hackers(at)postgresql(dot)org
Subject: Re: failed runcheck
Date: 2000-10-22 05:16:39
Message-ID: 200010220516.BAA25770@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> writes:
> > [ core dump due to ]
> > #0 IsSystemRelationName (relname=0x0) at catalog.c:176
> > #1 0x807ed9a in IsSharedSystemRelationName (relname=0x0) at catalog.c:197
> > #2 0x80e9272 in RelationInitLockInfo (relation=0x82af018) at lmgr.c:119
> > #3 0x81202ef in formrdesc (relationName=0x816ad7e "pg_class", natts=22,
> > att=0x8173600) at relcache.c:1193
> > #4 0x8120c12 in RelationCacheInitialize () at relcache.c:1953
>
> and proposes to fix this by having IsSystemRelationName make an
> arbitrary decision about whether a NULL input pointer should be
> considered to represent a system relation name or not. I do not
> like that, because AFAICS the decision is completely arbitrary.
> IsSystemRelationName shouldn't be called with a NULL pointer
> in the first place, and it has every right to cause a coredump
> if that happens.

I have removed the change. It will dump core again.

>
> It looks to me like the immediate bug here is that
> RelationGetPhysicalRelationName is returning a NULL pointer. Probably
> there are some missing or out-of-order steps in relcache initialization?
>
> I've been offline for a couple days due to DSL line failure :-( so

That is bad. Mine has been great, but I had my first DSL burp for 3
hours on Friday after 4 months of continuous uptime.

> I haven't seen Vadim's latest checkins. But I'm betting this is a bug
> in the changes to use OIDs as physical relnames. Do we even need
> RelationGetPhysicalRelationName anymore, and if so, what does it mean?

Good bet.

>
> Next question: why is RelationInitLockInfo using
> RelationGetPhysicalRelationName to get the input data for
> IsSharedSystemRelationName --- shouldn't that be a test on logical
> relation name? Or maybe the entire premise of
> IsSharedSystemRelationName is bogus now, and we ought to use some other
> way to decide if a relation is cross-database or not?

No, because if they create a temp table that masks a system table in the
current session, you want the physical name so it can know if it is a
real system table, or a temp/fake one.

You can ask why would someone try this, but it will work, or do
something while trying.

--
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-hackers by date

  From Date Subject
Next Message Tom Lane 2000-10-22 05:26:07 Re: failed runcheck
Previous Message Philip Warner 2000-10-22 02:54:25 Re: Last builtin OID?