Skip to content

Instantly share code, notes, and snippets.

@rapimo
Created May 23, 2013 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rapimo/5635977 to your computer and use it in GitHub Desktop.
Save rapimo/5635977 to your computer and use it in GitHub Desktop.
creating a ramdisk to use for postgres
# 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