Re: RAM-only temporary tables - Mailing list pgsql-hackers

From Alex Hunsaker
Subject Re: RAM-only temporary tables
Date
Msg-id 34d269d40811051557na24a796m48dc367ebcc71973@mail.gmail.com
Whole thread Raw
In response to RAM-only temporary tables  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
On Wed, Nov 5, 2008 at 16:00, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> An idea for a possible enhancement to PostgreSQL: allow creation of a
> temporary table without generating any disk I/O.  (Creating and
> dropping a three-column temporary table within a database transaction
> currently generates about 150 disk writes).

Well arguably you can already do this...

create tablespace ram location '/dev/shm/';
create temp table (junk int) tablespace ram;

In theory because only one backend needs the temp table we should be
able to use mmap() to fake it being a file as well without to much
trouble.  But im sure I am missing something...


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A bug with ALTER TABLE SET WITHOUT OIDS in CVS HEAD
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: RAM-only temporary tables