Created
May 23, 2013 13:15
-
-
Save rapimo/5635977 to your computer and use it in GitHub Desktop.
creating a ramdisk to use for postgres
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
# create ramdisk of 500MB (500 x 2048) | |
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1024000` | |
# create pg tablespace to use ramdisk | |
psql -c "CREATE TABLESPACE ramdisk LOCATION '/Volumes/ramdisk/'" postgres | |
# delete ramdisk | |
hdiutil eject /Volumes/ramdisk/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment