Re: Implementation of global temporary tables?
От | Andres Freund |
---|---|
Тема | Re: Implementation of global temporary tables? |
Дата | |
Msg-id | 20150715145249.GI5520@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Implementation of global temporary tables? (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: Implementation of global temporary tables?
|
Список | pgsql-hackers |
On 2015-07-15 12:58:51 +0100, Simon Riggs wrote: > On 14 July 2015 at 23:20, Jim Nasby <Jim.Nasby@bluetreble.com> wrote: > Pavel's original description of how to do this seem valid, and from the > link Tom agreed in 2009. > > For me the design summary is this > > * CREATE GLOBAL TEMP TABLE creates catalog entries like a normal table but > with different relkind > * When we see a request to INSERT, DEL, UPD, SEL from the temp table, if it > does not exist we create it as a TEMP table of the same name, using the > Global's pg_class entry as a template Why do we need to create that copy? We can just use the relfilenode in all backends by having the backendid in the filename? Yes, there's a some amount of additional code needed, but it's not that much? I actually think it might end up being less additional code than having a copy, because with the copy you'll have two different oids for global entry and the local copy. Regards, Andres
В списке pgsql-hackers по дате отправления: