Fixing postgresql