Skip to content

Instantly share code, notes, and snippets.

@ellmetha
Created December 16, 2014 08:52
Show Gist options
  • Save ellmetha/a17a824ac593de4aa386 to your computer and use it in GitHub Desktop.
Save ellmetha/a17a824ac593de4aa386 to your computer and use it in GitHub Desktop.
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