Re: postmaster errors with index on temp table?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: postmaster errors with index on temp table?
Date: 2000-07-11 15:03:30
Message-ID: 200007111503.LAA03818@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> At 09:27 10/07/00 -0400, Bruce Momjian wrote:
> >> >Yikes, I never looked in the postmaster log to see this.
> >>
> >> As Tom Lane said, it's non-fatal, and probably not important, but I worried
> >> me. I'll see if I can see the cause while I wait for people to test my new
> >> pg_dump with BLOB support.
> >
>
> I've had a look at temprel.c, and remove_all_temp_relations has the following:
>
> if (temp_rel->relkind != RELKIND_INDEX)
> {
> char relname[NAMEDATALEN];
>
> /* safe from deallocation */
> strcpy(relname, temp_rel->user_relname);
> heap_drop_with_catalog(relname, allowSystemTableMods);
> }
> else
> index_drop(temp_rel->relid);
>
> But, when a temp rel is dropped it seems that heap_drop_with_catalog also
> drops the indexes, so the error occurs when index_drop is called (at least
> I think this is the case). Certainly commenting out the last two lines
> *seems* to work.
>
> These lines were changed in rev 1.18 from 'heap_destroy*' calls to
> 'heap_drop' calls...did 'heap_destroy*' also delete related objects as
> heap_drop* now does?

Not sure why I introduced that bug in 1.18. Your suggestion was 100%
correct. I have applied the following patch.

Thanks for finding that.

--
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

Attachment Content-Type Size
unknown_filename text/plain 2.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2000-07-11 15:10:01 Re: Distribution making
Previous Message Bruce Momjian 2000-07-11 15:00:04 Re: md5 again