Re: temporary tables - Mailing list pgsql-general

From Mike Mascari
Subject Re: temporary tables
Date
Msg-id 3E28A02C.5090900@mascari.com
Whole thread Raw
In response to Re: temporary tables  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: temporary tables
Re: temporary tables
List pgsql-general
Bruce Momjian wrote:
> If you create a LOCAL TEMPORARY table, it will be automatically deleted
> at the end of the transaction.  Also, in 7.3, temporary table data will
> _not_ be synced/forced to disk like ordinary tables, though disk will
> still be used as backing store for the table.  You can drop them
> manually too.
>
> Greg Stark wrote:
>
>>I've always avoided using temporary tables for OLTP applications because I was
>>afraid the rapid creating and deleting of temporary data would limit
>>scalability.

Forgive me if I'm wrong Bruce, but I thought the LOCAL option
was WRT session visbility, not lifetime. IOW, all TEMP tables
exist until dropped or until the end of session, not
transaction. And LOCAL vs. GLOBAL determines visibility in other
  sessions. Wasn't the point of Gavin's patch for ON COMMIT DROP
that got bumped to 7.4 to have the DBMS drop TEMP tables at TX
commit?

Mike Mascari
mascarm@mascari.com



pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Fix FK deadlock, but no magic please
Next
From: Bruce Momjian
Date:
Subject: Re: temporary tables