Re: global temporary tables

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: global temporary tables
Дата
Msg-id
24898.1272079728@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Simon Riggs <simon@2ndQuadrant.com>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Simon Riggs <simon@2ndQuadrant.com>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Simon Riggs <simon@2ndQuadrant.com>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Simon Riggs <simon@2ndQuadrant.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Simon Riggs <simon@2ndQuadrant.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables "Greg Sabino Mullane" <greg@turnstep.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Jim Nasby <decibel@decibel.org>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Jim Nasby <decibel@decibel.org>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Jim Nasby <decibel@decibel.org>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Pavel Stehule <pavel.stehule@gmail.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Alvaro Herrera <alvherre@commandprompt.com>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Tom Lane <tgl@sss.pgh.pa.us>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Josh Berkus <josh@agliodbs.com>
Re: global temporary tables Andrew Dunstan <andrew@dunslane.net>
Re: global temporary tables Robert Haas <robertmhaas@gmail.com>
Re: global temporary tables Pavel Stehule <pavel.stehule@gmail.com>
Robert Haas  writes:
> On Fri, Apr 23, 2010 at 11:11 PM, Tom Lane  wrote:
>> I also kind of wonder what is supposed to happen if someone DROPs or
>> ALTERs the temp table definition ...

> ...not so much.  Here you REALLY want a DROP attempt to acquire an
> AccessExclusiveLock that will conflict with any outstanding
> AccessShareLocks.  Similarly, you're only going to be able to modify
> the schema for the relation if it's not otherwise in use.

I think you're presuming the answer to the question.  We could also view
the desired behavior as being that each session clones the temp table
definition at some instant (eg, first use).  The approach that you're
assuming seems fraught with large downsides: in particular, implementing
ALTER TABLE would be a mess.  The would-be alterer would need access to
the physical copies of all sessions, which throws out not only the
assumption that the relmapper entries can be private data, but all of
the access optimizations we currently have in the local buffer manager.
Not to mention the coding mess of having to repeat the ALTER operation
for each of N copies, some of which might disappear while we're trying
to do it (or if they don't, we're blocking backends from exiting).
I don't even know how you'd do the ALTER over again N times if you
only have one set of catalog entries describing the N copies.
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
Сообщение: Re: global temporary tables
От: Rod Taylor
Дата:
Сообщение: CIText and pattern_ops
FAQ