choosing the right RAID level for PostgresQL database

Solution 1:

Generally best practices for databases would be to put the database on a RAID 10 or RAID 1, separate from the OS & swap partitions.

For PostgreSQL you may also want to plan on a small, fast RAID 1 for the WAL (pg_xlog) directory to live on, as this will keep the DB from getting bogged down if there are a large number of writes. Also if you think you'll have several high-traffic tables you may want to have separate arrays/spindles for those (putting them into different tablespaces).

How important all of this is depends heavily on your workload, but the above is a good start. The PostgreSQL wiki probably has other good suggestions - see http://wiki.postgresql.org/wiki/Main_Page

Solution 2:

Gregory Smith recommends RAID 10 in his book PostgreSQL 9.0 High Performance (if you follow the link and click on the button "sample chapter" then you get chapter 2 of the book which covers how to choose your database hardware).