Re: Implementation of global temporary tables?

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Implementation of global temporary tables?
Дата
Msg-id CAFj8pRBo87DH-Lhxea4zXewPHZ6gLfSeyNfco0xbuQSX0H29rw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Implementation of global temporary tables?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers


2015-07-15 15:53 GMT+02:00 Zhaomo Yang <zhy001@cs.ucsd.edu>:
>  there is other question - what is effect of ALTER TABLE of global temp table on 
>  instances of this table in active sessions?

As I said, we need to first agree on the behaviors of the existing commands. I can think of two options now for ALTER TABLE: 1) only allow ALTER TABLE when there is no other active sessions (this is how Oracle deals with it.) 2) handle it as if session copies inherit from the global copy and ALTER TABLE executes on the global copy.

There are two possible kinds of GLOBAL TEMP tables -  session related and transation related. Transaction related tables has very short life - and @1 needs outage, @2 requires stronger locks and can slow and less effective - because a) some changes can be invisible in other transactions (depends on isolation levels), b) the structure can be changed, but function code not (without dependency on isolation levels) - so it can be non consistent, c) why to change table if this table will be dropped in next milisecond. For this case the behave like PL functions can be very practical ~ third option for ALTER TABLE

Regards

Pavel


Thanks,
Zhaomo

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Making ParameterStatus available for more parameter types?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] Generalized JSON output functions