When creating PostgreSQL database in Home > Subscriptions > example.com > Databases > Add a database with identical database and user name the following error appears:
PLESK_ERROR: Error: Connection to the database server failed: ERROR: role "test" already exists
This is limitation of PostgreSQL version shipped with Plesk.
1. Create user and database with different names. In Home > Subscriptions > example.com > Databases > Add a database make the Database name field different from Database user name.
2. To create PostgreSQL database with the same database and user name make suggestion on Plesk Uservoice - top-ranked suggestions are likely to be implemented in Plesk future releases.