Re: idea: global temp tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Greg Stark" <stark(at)enterprisedb(dot)com>, "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 17:52:10
Message-ID: 11074.1241027530@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Any chance that some of these improvements could be applied to temp
> tables created with the PostgreSQL-specific syntax while we're at it?

You mean the Postgres-specific behavior, no?

Trying to support a table without *any* pre-existing catalog entries
seems even harder than doing it without changing the pre-existing
catalog entries. It's something we've thought about before and failed
to find a decent solution for. I think there was some discussion of
allowing pg_class and other relevant tables to implicitly have
session-local child tables that would hold session-local catalog entries
(and be stored in the local bufmgr); but AFAIR we never worked all the
bugs out of the concept.

> The need for several tables to be created on disk to materialize a
> single temp table currently causes performance problems in some
> contexts. I don't think the updates to the system tables have the
> same magnitude of performance hit as creating these tables, especially
> if write barriers are on.

True; it's pure supposition that avoiding the catalog thrashing is
actually important in context of everything else that has to happen.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2009-04-29 18:03:14 Re: Restore deleted rows
Previous Message Kevin Grittner 2009-04-29 17:44:31 Re: idea: global temp tables