Re: Temporary, In-memory Postgres DB?

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: "Michelle Konzack" <linux4michelle(at)freenet(dot)de>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Temporary, In-memory Postgres DB?
Date: 2007-11-19 15:31:39
Message-ID: D7FF158337303A419CF4A183F48302D6035A338E@hdsmsx411.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sounds like a lot of work. I don't want to do anything risky. And they
probably won't give me a ramdisk anyway.

Being able to run a small but full featured, purely in-memory DB (sort
of like SQLite) would probably fit a niche that Postgres competitors
don't address. So I guess this is just a wish list / suggestion matter
at this point.

-dave

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Michelle
Konzack
Sent: Saturday, November 17, 2007 11:48 AM
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Temporary, In-memory Postgres DB?

Am 2007-11-07 10:03:24, schrieb Gauthier, Dave:
> Is there such a thing as a temporary, probably in-memory, version of a
> Postgres DB? Sort of like SQLite, only with the features/function of
> PG? A DB like this would exist inside of, and for the duration of, a
> script/program that created it, then vanish when the script/program
> ends.

I have done this before but it requires very much memory
if you need it writable and you must vaccmizer very often.

You need a shellscript which replace the "startupscript" for the
PostgreSQL in which you

1) create the RAMDISK
2) then decompress the previously build data.tar.bz2
3) start the PostgreSQL

and replace the shutdownscript with your own shellscript which do

1) stop write access to the PostgreSQL
2) vacuumizer the database
3) shutdown the PostgreSQL
4) make a backup of the previously created data.tar.bz2
4) compress the datadir to data.tar.bz2

I run an Opteron 140 with 8 GByte of memory and sometimes I have
problems with too less memory... but unfortunatly I have not found
a Singel-Opteron Mainboard which support more then 8 GByte of memory
where I prefere to use 16-32 GByte...

Thanks, Greetings and nice Day
Michelle Konzack
Tamay Dogan Network
Open Hardware Developer
Debian GNU/Linux Consultant

--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSN LinuxMichi
0033/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Hart 2007-11-19 15:42:24 Re: convert access sql to postgresql
Previous Message Tom Lane 2007-11-19 15:20:24 Re: possible to create multivalued index from xpath() results in 8.3?