Re: Embedded Database - Mailing list pgsql-general

From dmartini@uni-hohenheim.de
Subject Re: Embedded Database
Date
Msg-id 1092045678.41174b6e9f70d@webmail.uni-hohenheim.de
Whole thread Raw
In response to Embedded Database  ("Richard Connamacher" <rich.n1@indieimage.com>)
List pgsql-general
Hi,

Citing Richard Connamacher <rich.n1@indieimage.com>:
> And, does anybody know if it's possible for PostgreSQL to run a database
> entirely in RAM
> without saving the file out to disk?

In principle yes:
On BSD platforms, there's the possibility to create memory based filesystems,
mount them (command is mount_mfs, don't remember about Linux, it's possible
there too, but it's been so long since I last used it) and use them like a real
hard disk based file system. Of course, everytime you reboot, your database
would be gone, so you would have to write a program/shell script to initialize
the database (initdb), start the database server with the proper config files
(you would want to modify the WAL behaviour, as the default behaviour is
probably mostly useless in this case (if you pull the power supply, the data
is gone anyways)) and populate the database.

If this is really sensible depends on your needs. Offline field measurement
data logging on machines without a hard drive would be a use which comes to
mind (but only if you require some features of postgresql which can not be
done using a simpler database engine (maybe a flatfile database).

Regards,
Daniel

pgsql-general by date:

Previous
From: Marcel Boscher
Date:
Subject: Stored Procedure - Iam totally lost!
Next
From: David Garamond
Date:
Subject: plruby issue with redeclaring functions