Postgresql – How to put one table on one disk and anther table on another (a ramdisk)

postgresqltablespaces

I need to build a database with one table stored on one disk and anther table stored on a different disk (a ramdisk).

Is it possible to do it?

As far as I know, using two separate databases, one for each disk, is not efficient.

I am considering PostgreSQL, but other options can be ok. The reason I want to use a ramdisk is to deal with non critical data that can be deleted at any time, to avoid SSD wearing.

Best Answer

I have not done it but, if not mistaken, it can be easily accomplished with tablespaces.

Let us know how it went.