From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Mike Mascari <mascarm(at)mascari(dot)com> |
Cc: | Greg Stark <gsstark(at)mit(dot)edu>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: temporary tables |
Date: | 2003-01-18 01:18:59 |
Message-ID: | 200301180118.h0I1IxN07511@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Oops, I was wrong. I thought we had some auto-destroy of table on
commit. I now remember we have _only_ in 7.4:
CREATE TABLE
...
[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
We tried to get this into 7.3, but it arrive too late.
---------------------------------------------------------------------------
Mike Mascari wrote:
> 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(at)mascari(dot)com
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | kanchana | 2003-01-18 03:20:08 | Re: Fw: configure error with krb5 |
Previous Message | Mike Mascari | 2003-01-18 00:30:36 | Re: temporary tables |