From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Zhaomo Yang <zhy001(at)cs(dot)ucsd(dot)edu> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Implementation of global temporary tables? |
Date: | 2015-07-15 14:24:26 |
Message-ID: | CAFj8pRBo87DH-Lhxea4zXewPHZ6gLfSeyNfco0xbuQSX0H29rw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2015-07-15 15:53 GMT+02:00 Zhaomo Yang <zhy001(at)cs(dot)ucsd(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-07-15 14:52:29 | Re: [PATCH] Generalized JSON output functions |
Previous Message | Robert Haas | 2015-07-15 14:14:20 | Re: Making ParameterStatus available for more parameter types? |