Update postgresql configuration on clean install and upgrade

I've tested this in both clean install and upgrade scenarios (pedant in both cases, and scenarios like register node, search, delete node, upload cookbook, etc). @sdelano , @jkeiser , @marcparadise, can you take a look?