3 ms·
I'm very tempted to try that, but this warning in the docs you linked sounds pretty scary: > Placing a tablespace on a temporary file system like a ramdisk ris
by pjungwir 11y ago
I'm very tempted to try that, but this warning in the docs you linked sounds pretty scary:
> Placing a tablespace on a temporary file system like a ramdisk risks the reliability of the entire cluster
Are you sure putting your test db on a ramdisk won't destroy the development db too?
- rgbrenner 11y agoThe idea is, since it's a development db, after you destroy it, you can recreate it easily. But there is a way to do it without destroying the db. When you're finished, stop postgres, copy the files off of the ramdisk, and then you can destroy the ramdisk. When you want to start it back up, create the ramdisk, copy the files back, and then start postgres. Obviously something like MySQL's memory tables would be a better solution.. but postgres doesn't have anything similar. So this is as close as you can get.
- pjungwir 11y agoThanks for writing back! I don't love either of those options. Maybe I should just make a separate cluster for my test database?!: `initdb -D /pgramdisk` I wonder if anyone has tried this, and what the drawbacks are.