Re: Embedded Database

From: dmartini(at)uni-hohenheim(dot)de
To: Richard Connamacher <rich(dot)n1(at)indieimage(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Embedded Database
Date: 2004-08-09 10:01:18
Message-ID: 1092045678.41174b6e9f70d@webmail.uni-hohenheim.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Citing Richard Connamacher <rich(dot)n1(at)indieimage(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Garamond 2004-08-09 10:07:09 plruby issue with redeclaring functions
Previous Message Marcel Boscher 2004-08-09 09:13:46 Stored Procedure - Iam totally lost!