Ensure that the postgres database exists and that you can connect to it.
If no connections are possible, and if using a database other than the default postgres database, specify the name of the database to which you can connect in the userprofile_database parameter in the postgresql.conf file.
Refer to "Parameters for the Policy-based Login Security" for parameters.