Re: Temporary, In-memory Postgres DB?

From: Michelle Konzack <linux4michelle(at)freenet(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Temporary, In-memory Postgres DB?
Date: 2007-11-17 16:48:17
Message-ID: 20071117164817.GZ21320@freenet.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message nabakumar salam 2007-11-17 20:57:49 HINT: Please REINDEX it.
Previous Message Shane Ambler 2007-11-17 16:37:03 Re: Need help with complicated SQL statement