PostgreSQL Installation Notes
Install PostgreSQL 16.x on port 5432 if you intend to use PostgreSQL as a backing datastore for the ODS / API.
If you already have a PostgreSQL server configured with a superuser different to postgres...
In environments where PostgreSQL server was setup with a custom superuser instead of the default postgres, the Ed-Fi ODS / API database templates will fail to be restored because they require a postgres user or a user with a postgres role to exist.
For these scenarios, a postgres role can be created and assigned to the user executing the restore. This example will show how to add such role without login capabilities and assign to the custom superuser.
Prerequisites
Ensure you have:
- Custom Superuser Credentials – The username and password for the custom superuser.
- Access to the PostgreSQL Server – Via the
psqlcommand-line tool or a PostgreSQL client likepgAdmin.
Steps to Create a postgres Role
1. Connect to the PostgreSQL Server
Connect to your PostgreSQL server using the custom superuser account:
psql -U <custom_superuser> -h <host> -d <database_name>
Enter the password for <custom_superuser> when prompted.
2. Create the postgres Role
Run the following SQL command to create a postgres role without login capability:
CREATE ROLE postgres WITH NOLOGIN INHERIT;
3. Assign the postgres Role to custom superuser
Assign the role to the custom superuser (or the user you created for the EdFi ODS /API database):
GRANT <custom_superuser> TO postgres;