Changes to support postgresql on linux