Re: Implementation of global temporary tables?

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Implementation of global temporary tables?
Дата
Msg-id 55A65177.7070107@dunslane.net
обсуждение исходный текст
Ответ на Re: Implementation of global temporary tables?  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Implementation of global temporary tables?  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Implementation of global temporary tables?  (Zhaomo Yang <zhy001@cs.ucsd.edu>)
Список pgsql-hackers
On 07/15/2015 07:58 AM, Simon Riggs wrote:

>
> 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
>
> That meets the SQL Standard and doesn't contain any visibility 
> problems or need for new internals.
>
> The purpose of this feature is to automatically create a temp table 
> with the same definition whenever needed. The discussion of "bloat" is 
> just wrong. We create exactly the same amount of bloat as if we had 
> typed CREATE TEMP TABLE. Optimising temp table entries in the catalog 
> is another, separate patch, if we care.
>
>

Sounds fine in general. I'm a bit curious to know what are the locking 
implications of vivifying the table on access.

cheers

andrew



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Implementation of global temporary tables?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Implementation of global temporary tables?