This sort of thing can happen when there are permissions issues with the user and/or database that has been setup in postgres.
A formula that has worked in the past follows these steps:
- Add user APPFWK_USER to postgres, with attributes of "CREATEDB"
- Add database APPFWK_DB to postgres, with owner as APPFWK_USER
- Assign user permissions to database with privileges "ALL", and flags "CREATEDB"
After these steps, running reset_appfwk should work correctly.
Correct ! I forgot to give the database ownership to my db user !
Below the command to create database on red hat.
Loggin and environment variable setup:
# su - postgres
User and db creation:
createuser -P <APPFWK_USER>
createdb <APPFWK_DB> -E UTF8 --owner=<APPFWK_USER>
Grant rights to user:
GRANT ALL PRIVILEGES ON DATABASE <APPFWK_DB> TO <APPFWK_USER>;
ALTER USER <APPFWK_USER> CREATEDB;