Skip site navigation (1) Skip section navigation (2)

Re: idea: global temp tables

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: idea: global temp tables
Date: 2009-04-28 14:59:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Pavel Stehule escribió:
> Hello
> I am thinking about global temp tables. One possible solution is
> creating global temporary table like normal table and in planner stage
> check using this table. When some global temporary table is detected,
> then real temporary table is created and used in execution plan. It's
> like:
> CREATE GLOBAL TEMP TABLE foo(a varchar); -- create global empty table foo
> SELECT * FROM foo;
>   a) is relevant temp table for foo, use it
>   a) when not, then CREATE TEMP TABLE foo INCLUDING
>   b) transform origin query to SELECT * FROM;
> Ideas? Notes? Objections?

Maybe we could make this work by fiddling with a different smgr -- on
it, smgr_sync would be a noop, as would smgr_immedsync, and we could
kludge something up to truncate relations during recovery.

Alvaro Herrera                      
The PostgreSQL Company - Command Prompt, Inc.

In response to


pgsql-hackers by date

Next:From: Andreas PflugDate: 2009-04-28 15:14:34
Subject: Re: Clean shutdown and warm standby
Previous:From: Greg StarkDate: 2009-04-28 14:36:14
Subject: Re: Extra cost of "lossy mode" Bitmap Scan plan

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group