Created
December 16, 2014 08:52
-
-
Save ellmetha/a17a824ac593de4aa386 to your computer and use it in GitHub Desktop.
PostgreSQL DB on a ramfs tablespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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