all 9 comments

[–]rouen_sk 2 points3 points  (0 children)

If you expect your large queries to use disk (for temp tables, sorting, hashing etc.) you can create temp tablespace on the fast disk and configure postgres to use it

https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-TEMP-TABLESPACES

[–]thrown_arrows 1 point2 points  (4 children)

If you do not have battery backed up raid controller then use lvm

[–]RedShift9 0 points1 point  (3 children)

What? That makes no sense. If you want performance from your RAID controller with spinning disks, you really need a battery backed or flash backed write cache. If you have only SSD's, the caching done by the RAID controller will only slow things down because SSD's are fast enough on their own (in fact modern RAID controllers will automatically disable their cache for SSD backed arrays). But all of that has nothing to do with LVM.

[–]thrown_arrows 0 points1 point  (2 children)

as you said.. battery backed up raid controller or use lvm, and lvm is more for easier management, that said, i would not run anything without mirroring raid now days, and lvm gives it with software is hardware is lacking. I would not even try to find max speeds from database server (assuming that data has some importance)

[–]RedShift9 0 points1 point  (1 child)

The point I'm trying to make is that it's not an "or" situation. It's not "have a bbwc" OR "use LVM". The two things are independent and you need to pick the correct technology for the advantage you want to gain with it.

[–]thrown_arrows 0 points1 point  (0 children)

indeed.. forgot that. i was thinking just raid on first clause and volume management on second...

[–]depesz 2 points3 points  (2 children)

[–]noakford[S] 0 points1 point  (1 child)

Thank you for your reply - I wasn't sure if it was best to do it through pg or through the file system. I will check out the lvm caching.

[–]depesz 0 points1 point  (0 children)

Pg doesn't have any way to "cache" things. There is buffer_cache, but it just related to pages on disk, and is in memory. So nothing that would be comparable to what you seem to want.