Re: Temporary, In-memory Postgres DB? - Mailing list pgsql-general

From Gauthier, Dave
Subject Re: Temporary, In-memory Postgres DB?
Date
Msg-id D7FF158337303A419CF4A183F48302D6035A338E@hdsmsx411.amr.corp.intel.com
Whole thread Raw
In response to Re: Temporary, In-memory Postgres DB?  (Michelle Konzack <linux4michelle@freenet.de>)
List 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@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Michelle
Konzack
Sent: Saturday, November 17, 2007 11:48 AM
To: pgsql-general@postgresql.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)

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: possible to create multivalued index from xpath() results in 8.3?
Next
From: Mike Charnoky
Date:
Subject: Re: convert custom datatype to array