Postgres database deadlock issue I am using Cloudera Manager to monitor and configure Hadoop. I choose PostgreSQL as metastore of HUE - a web portal to submit your SQL to Hadoop. 

When I submit a SQL, the HUE says the database is locked. I don't have any database management experience. 

So, how to find the root cause and diagnose? 

I try to connect to the database postgres which I believe this is the meta-database of PostgreSQL itself. I expect I can find the processes, events and lock information in this database. 

postgres=&gt; \c postgres
Password for user hue:
You are now connected to database "postgres" as user "hue".
postgres=&gt; \d
No relations found.
postgres=&gt;


I connect to this database - 'postgres' as user - 'HUE'. But I didn't find any tables under it. Am I using the wrong user? 

How can I access this database successfully? How can I discover why the database is locked? Where is it locked? On which table and which database?
Your software is most likely not using the default postgres database (that is a database that is normally reserved only to store the list of databases, users, and other globals).

From psql, run \l to list the available databases. Your database will be something other than postgres, template0, or template1. Try connecting to one that is not one of the above (\c dbname) and then run \d again to list tables.