PostgreSQL Server Tuning. I just used it, and so I don't have to google it again and again, I made a blogmark. Additionally, you will probably also need to increase kernel parameters so that the shared memory can be allocated at all. Because PostgreSQL likes a lot of memory when you execute more complex queries and the default allocation of about 100 MB is definitely too low for serious use.