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

From Tom Lane
Subject Re: Bug with temporary child of a permanent table after recovery
Date
Msg-id 28278.1355710658@sss.pgh.pa.us
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  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-bugs
I wrote:
> On the whole I think resurrecting the rd_islocaltemp flag might be the
> best thing.  We can keep the use of "relpersistence ==
> RELPERSISTENCE_TEMP" to do what rd_istemp used to do, it's just the
> equation of "rd_backend == MyBackendId" with "is my temp table" that's
> bogus.  And this way gets rid of some unnecessary cross-branch coding
> differences.

Here is a draft patch for this.  Thoughts/objections?

One thing I noticed that maybe needs more work is that tablecmds.c in
general seems mighty willing to hack upon temp tables belonging to other
sessions.  I added tests for that in the places where there already were
checks on relpersistence, but I wonder whether we ought not simply
forbid all forms of ALTER on nonlocal temp rels, right up at the top.

            regards, tom lane


Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug with temporary child of a permanent table after recovery
Next
From: lr@pcorp.us
Date:
Subject: BUG #7756: When upgrading postgis extension get row is too big: size 9272, maximum size 8160