Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 HD partitions - one with SSD and another with regular hard drives.

I have multiple databases (as in logical database, not physical) with 1 data directory. I want the data for 1 of the databases to reside in the SSD partition because it's a database that will have LOT more reads/writes than the other databases. And since the SSD partition is limited in space, I can't store all the databases there, just that one.

Is there a way to configure this in Postgres - is it possible? Is there a tutorial online that I can read? I tried Googling but all the results talk about partitioning tables logically, not across different hard drive partitions.

share|improve this question
What you need is tablespaces. – Milen A. Radev Dec 6 '13 at 2:09

You can create a table space that uses the second partition. Then just alter the database to use that partition.

CREATE TABLESPACE fastspace LOCATION '/mnt/ssdpart';

See also, and

Good luck!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.