Re: Bug with temporary child of a permanent table after recovery - Mailing list pgsql-bugs

From Jeff Davis
Subject Re: Bug with temporary child of a permanent table after recovery
Date
Msg-id 1355534626.32384.6.camel@sussancws0025
Whole thread Raw
In response to Re: Bug with temporary child of a permanent table after recovery  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug with temporary child of a permanent table after recovery
List pgsql-bugs
On Fri, 2012-12-14 at 17:56 -0500, Tom Lane wrote:
> Perhaps a better idea is to not overload rd_backend to serve both
> the "physical name of file" purpose and the "is it my temp table"
> purpose.  We could add an additional relcache field with the
> three possible states "not temp, my temp, somebody else's temp"
> and make sure that the third state gets selected when there's
> a chance collision like this.  Or resurrect the old rd_istemp and
> rd_islocaltemp flags.
>
> Thoughts?

Rather than bring back that flag, can we just use isTempOrToastNamespace
within RELATION_IS_OTHER_TEMP?

  #define RELATION_IS_OTHER_TEMP(relation) \
      ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP \
      && !isTempOrToastNamespace((relation)->rd_rel->relnamespace))

(I haven't analyzed the above code very carefully; it's just for
illustration purposes).

Regards,
    Jeff Davis

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug with temporary child of a permanent table after recovery
Next
From: pg-gts@snkmail.com
Date:
Subject: BUG #7754: Contrib start scipt comment refers to dead URL