API Portal 4.2.x
Default Postgres database
On in-proper power-down and restore the database log lock status can be in set in an unavailable state.
Connected to the docker container which is not starting.
docker exec -it <containerid> sh
/ # psql -U admin
Password for user admin:
Type "help" for help.
admin=# \c rbac
You are now connected to database "rbac" as user "admin".
rbac=# SELECT * FROM DATABASECHANGELOGLOCK;
Check for lock record with the Portal container IP.
Run this command to release the lock
UPDATE DATABASECHANGELOGLOCK SET locked='false', lockgranted=null, lockedby=null WHERE id=1;
All databases should be checked for LOGLOCK entries. The above example is for rbac database.
Once logged on to psql, run \l command to list all available databases.