Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Our development server currently has a file-based PostgreSQL server installed and running perfectly. However, we're trying to speed up our Rspec/Autotest runs and I was thinking that running a secondary in-memory version of Postgres might speed things up. And since we really don't care about losing the test data (it gets blown away at the beginning of every test anyway), we shouldn't need to sync it back to the filesystem or anything.

I read http://rhaas.blogspot.com/2010/06/postgresql-as-in-memory-only-database_24.html which talks about some of the configuration options you should use for performance, but I need a bit of help actually getting it set up.

How should I create the RAM disk and run a second version of Postgres?

I read somewhere that I can copy the init.d script and just pass a second configuration file. Is it that simple?

share|improve this question
Frankly, I'm not convinced running it in-memory will gain you much; if you disable all the disk flushing and synchronisation for durability and increase your OS's dirty write-out limits, you'll get close to the same effect anyway. See stackoverflow.com/questions/9407442/… –  Craig Ringer Nov 8 '12 at 1:42
BTW, what's your OS and version? Linux, by the sounds, but which Linux? –  Craig Ringer Nov 8 '12 at 1:43
Currently we're running Ubuntu 12.04, but I'm also running this locally on my Mac and would like to try the same thing. Linux is definitely the most important one though :-) –  Topher Fangio Nov 8 '12 at 2:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.