Re: Implementation of global temporary tables?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Implementation of global temporary tables?
Date: 2015-02-02 10:25:44
Message-ID: CAFj8pRB=-SjXSugceiocadsjwOsXHL-b0cz5DSCBkaFeS2OudQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-02-02 11:15 GMT+01:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:

> Hello
>
> Six years ago we did discuss about global temporary tables - persistent
> schema, ephemeral data.
>
> http://postgresql.nabble.com/idea-global-temp-tables-td2007217.html
>
> I am thinking so some reasons why implement this feature are valid:
>
> * we can get some performance benefit against current temp tables - less
> the catalogue bloating,
>
> * we can simplify a static validation of plpgsql functions when temp
> tables are used,
> more global temp tables are little bit comfortable for developers,
>
> * we can simplify migration from some other databases, where global temp
> tables are default.
>

I forgot other possible benefit:

* using temp tables on slaves - (needs 3c implementation)

>
> Some was changed from 2009:
>
> * We have updatable CTE
>
> * We have unlogged tables
>
> Opened questions:
>
> 1. Name and conformance with standard of this feature - because we doesn't
> support modules, a mapping ANSI -> PG should not be trivial
>
> 2. Implementation
>
> I see three possible ways how to implement it:
>
> 2.a - using on demand created temp tables - most simple solution, but
> doesn't help with catalogue bloating
>
> 2.b - using unlogged tables for holding statistics, relfilenode, and all
> necessary data
>
> 3.c - store ephemeral metadata only in memory without MVCC
>
> Is there still interest about this feature?
>
> Comments, notes?
>
> Pavel
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Atri Sharma 2015-02-02 10:51:50 Re: Implementation of global temporary tables?
Previous Message Pavel Stehule 2015-02-02 10:15:22 Implementation of global temporary tables?