it depends on how good you are with sql <eg>. Mysql will probably be better for what you're looking for. Mysql, especially with lots and lots of records, is going to be much faster than postgre. postgre is good when you're working in a hardcore environment, need triggers, commit/rollback, basically mission critical stuff. mysql takes these out, which makes it much faster.
on another unrelated note, why code your own forum? theres plenty out there that are good
my 2 favorites are iconboard and yabb.