On Oct 19, 2010, at 2:01 PM, Martijn van Oosterhout wrote:
> On Tue, Oct 19, 2010 at 02:52:01PM -0400, Robert Haas wrote:
>> Well, temp tables really want a separate set of XIDs with a separate
>> CLOG, too. Admittedly, they don't necessarily need WAL, if you can
>> make them work without catalog entries, but that's not so easy either.
>
> At one point there was the idea to have a sort of permanent temporary
> tables which would have a pg_class entry but each session would have
> its own copy. Replicated slaves would then also be able to use this
> construction.
>
> Doesn't help with the XIDs though.
I think we're trying to boil the ocean here...
There are a lot of downsides to temp tables touching the catalog. This feature is probably important enough to justify
evenif it doesn't help with replication.
Of course, once we have global temporary tables the next step is to look at other ways they can be optimized. Certainly
theydon't need to WAL log. That's another step closer to supporting them in replication.
The journey of 1000 miles starts with a single step...
Also, global temp tables would definitely help us at work, which means I can convince TPTB to spend money on this. So
ifanyone is serious about working on them contact me off-list. I doubt we could fund the entire effort, but we could
certainlyput a dent in it.
--
Jim C. Nasby, Database Architect jim@nasby.net
512.569.9461 (cell) http://jim.nasby.net