postgresql is not working correctly