Added same PostgreSQL changes for realmd