Re: idea: global temp tables

From: Greg Stark <stark(at)enterprisedb(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: idea: global temp tables
Date: 2009-04-29 15:12:03
Message-ID: 4136ffa0904290812rd018bffl16a8336a88c14b1e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 28, 2009 at 6:18 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> I was thinking in terms of throwing a warning in 8.4 and
>> implementing new behavior in 8.5.
>
> If we're on that time frame with it, I guess it's not too early to
> suggest what we would implement in 8.5.
>
> I would suggest that it is clear that what Pavel is requesting is
> fully compliant with the spec's definition of global temporary tables.

I think there are implicit assumptions that the spec is making about
the performance implications of using these temporary tables. It's
offering a tool that can reasonably be used in place of views and CTEs
in otherwise pure DML.

I didn't follow precisely what Pavel was describing but IMHO anything
which does any DDL, even implicitly, would be make the feature
impractical in many cases where it really ought to work. Anything
which causes pg_class to bloat or require special vacuum strategies is
just not going to scale.

The whole point of having the schema declared in advance and then
having each procedure execution have access to a private (or
non-private) data store following that predefined schema is to avoid
having to execute any catalog changes with all the locking and catalog
i/o that DDL requires.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-04-29 15:24:42 Re: idea: global temp tables
Previous Message Andy Lester 2009-04-29 15:03:24 Throw some low-level C scutwork at me