Re: [HACKERS] temp table oddness? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] temp table oddness?
Date
Msg-id 1884.936479624@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] temp table oddness?  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> I have added temp invalidation code for aborted transactions:

> New behavour:

>     test=> begin;
>     BEGIN
>     test=> create temp table test (x int);
>     CREATE
>     test=> create index i_test on test(x);
>     CREATE
>     test=> abort;
>     NOTICE:  trying to delete a reldesc that does not exist.
>     NOTICE:  trying to delete a reldesc that does not exist.
>     ABORT
>     test=> create temp table test(x int);
>     CREATE

OK, cool.  I think I know where to fix those "NOTICES", too:
the relcache indexes temp relations by their real names, so
RelationNameGetRelation() ought to substitute the real name before
probing the cache.  As it stands you wind up with two relcache entries
for the temp table, which is bad.  Working on it now.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] temp table oddness?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] temp table oddness?