Skip to content

Instantly share code, notes, and snippets.

@ellmetha
Created December 16, 2014 08:52
PostgreSQL DB on a ramfs tablespace
#!/bin/sh
sudo mount -t ramfs none /mnt/
sudo mkdir /mnt/pgdata/
sudo chown postgres:postgres /mnt/pgdata/
sudo service postgresql start
psql -d postgres -c "CREATE TABLESPACE ramfs LOCATION '/mnt/pgdata'"
psql -d postgres -c "CREATE DATABASE testdb TABLESPACE ramfs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment