- This creates a 560mb ramdisk. Adjust the size accordingly. I think the number at the end of the command is the number of disk blocks. They are 2kb in size for me.
- Restarting postgres is not necessary; you can create the ramdisk and tablespace while postgres is running.
- You will lose all data in the ramdisk tablespace when you shut your machine down
$ diskutil erasevolume HFS+ "postgres_ramdisk" `hdiutil attach -nomount ram://1165430` Started erase on disk1 Unmounting disk Erasing Initialized /dev/rdisk1 as a 569 MB HFS Plus volume